code: def make_cutout(self, data, masked_array=False):
          
  
          data = np.asanyarray(data)
          if data.shape != self._segment_img.shape:
              raise ValueError('data must have the same shape as the '
                               'segmentation image.')
  
          if masked_array:
              mask = (self._segment_img[self.slices] != self.label)
              return np.ma.masked_array(data[self.slices], mask=mask)
          else:
              return data[self.slices]
docs: Create a (masked) cutout array from the input ``data`` using the
          minimal bounding box of the segment (labeled region).
  
          If ``masked_array`` is `False` (default), then the returned
          cutout array is simply a `~numpy.ndarray`.  The returned cutout
          is a view (not a copy) of the input ``data``.  No pixels are
          altered (e.g. set to zero) within the bounding box.
  
          If ``masked_array` is `True`, then the returned cutout array is
          a `~numpy.ma.MaskedArray`, where the mask is `True` for pixels
          outside of the segment (labeled region).  The data part of the
          masked array is a view (not a copy) of the input ``data``.
  
          Parameters
          ----------
          data : 2D array-like
              The data array from which to create the masked cutout array.
              ``data`` must have the same shape as the segmentation image.
  
          masked_array : bool, optional
              If `True` then a `~numpy.ma.MaskedArray` will be created
              where the mask is `True` for pixels outside of the segment
              (labeled region).  If `False`, then a `~numpy.ndarray` will
              be generated.
  
          Returns
          -------
          result : 2D `~numpy.ndarray` or `~numpy.ma.MaskedArray`
              The 2D cutout array.