<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format(self):
 """ Crop and resize the supplied image. Return the image and the crop_box used. If the input format is JPEG and in EXIF there is information about rotation, use it and rotate resulting image. """

        if hasattr(self.image, '_getexif'):
            self.rotate_exif()
        crop_box = self.crop_to_ratio()
        self.resize()
        return self.image, crop_box