<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _verify_shape_compatibility(self, img, img_type):
 """Checks mask shape against input image shape."""


        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]))