<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def image(self):
 """An Image like array of ``self.data`` convenient for image processing tasks * 2D array for single band, grayscale image data * 3D array for three band, RGB image data Enables working with ``self.data`` as if it were a PIL image. See https://planetaryimage.readthedocs.io/en/latest/usage.html to see how to open images to view them and make manipulations. """

        if self.bands == 1:
            return self.data.squeeze()
        elif self.bands == 3:
            return numpy.dstack(self.data)