code: def _verify_shape_compatibility(self, img, img_type):
          
  
          if self.input_image.shape[:-1] != img.shape:
              raise ValueError('Shape of the {} ({}) is not compatible '
                               'with input image shape: {} '
                               ''.format(img_type, img.shape, self.input_image.shape[:-1]))
docs: Checks mask shape against input image shape.