docstr: Crop the given PIL Image and resize it to desired size.
  Args:
      img (PIL Image): Image to be cropped. (0,0) denotes the top left corner of the image.
      output_size (sequence or int): (height, width) of the crop box. If int,
          it is used for both directions
  Returns:
      PIL Image: Cropped image.
docstr_tok: ["Crop","the","given","PIL","Image","and","resize","it","to","desired","size",".","Args",":","img","(","PIL","Image",")",":","Image","to","be","cropped",".","(","0,0",")","denotes","the","top","left","corner","of","the","image",".","output_size","(","sequence","or","int",")",":","(","height",",","width",")","of","the","crop","box",".","If","int",",","it","is","used","for","both","directions","Returns",":","PIL","Image",":","Cropped","image","."]
code: def __call__(self, img):
      """Crop the given PIL Image and resize it to desired size.
      Args:
          img (PIL Image): Image to be cropped. (0,0) denotes the top left corner of the image.
          output_size (sequence or int): (height, width) of the crop box. If int,
              it is used for both directions
      Returns:
          PIL Image: Cropped image.
      """
      image_width, image_height = img.size
      image_short = min(image_width, image_height)
  
      crop_size = (
          float(self.imgsize) / (self.imgsize + 32) * image_short
      )
  
      crop_height, crop_width = crop_size, crop_size
      crop_top = int(round((image_height - crop_height) / 2.0))
      crop_left = int(round((image_width - crop_width) / 2.0))
      return img.crop(
          (
              crop_left,
              crop_top,
              crop_left + crop_width,
              crop_top + crop_height,
          )
      )
  
imports: import math
  import random
label_desc: Use image node_id 2 for calling the EfficientNetCenterCrop obj's underlying member method code with example usage: obj.__call__(img) and returns: img