def METHOD_NAME(self, image, x, y):
    if not self.use_crop:
        return image
    image_cols = image.shape[0]
    image_rows = image.shape[1]
    b_use_crop = (image_rows != self.target_rows) or (
        image_cols != self.target_cols)
    return image[y: y+self.target_rows, x: x+self.target_cols, ...] if b_use_crop else image