@staticmethod
def apply_custom_crop(image, crop_coordinates):
    """
        The format of the image `crop_coordinates` should be [x, y, width, height] and PIL cropping format is
        [left, upper, right, lower].
        """
    crop_x, crop_y, crop_w, crop_h = crop_coordinates
    left = crop_x
    upper = crop_y
    right = crop_x + crop_w
    lower = crop_y + crop_h
    coordinates = [left, upper, right, lower]
    return image.crop(coordinates)
