docs: def to_pillow_image(self, return_mask=False):
          """Return Pillow. Image, and optionally also mask."""
          img = np.rollaxis(np.rollaxis(self.image.data, 2), 2)
          img = Image.fromarray(img[:, :, 0]) if img.shape[2] == 1 else Image.fromarray(img)
          if return_mask:
              mask = np.ma.getmaskarray(self.image)
              mask = Image.fromarray(np.rollaxis(np.rollaxis(mask, 2), 2).astype(np.uint8)[:, :, 0])
              return img, mask
          else:
              return img