parameters: (img, size)
return_statement: return crop(img, crop_top, crop_left, crop_height, crop_width)
docstring: Crop the input PIL image at the center to the given size.
  
      Args:
          img (PIL image): Image to be cropped.
          size (Union[int, tuple]): The size of the crop box.
              If size is an integer, a square crop of size (size, size) is returned.
              If size is a sequence of length 2, it should be (height, width).
  
      Returns:
          img (PIL image), Cropped image.
docstring_summary: Crop the input PIL image at the center to the given size.
docstring_tokens: Crop the input PIL image at the center to the given size .
function: def center_crop(img, size):
      """
      Crop the input PIL image at the center to the given size.
  
      Args:
          img (PIL image): Image to be cropped.
          size (Union[int, tuple]): The size of the crop box.
              If size is an integer, a square crop of size (size, size) is returned.
              If size is a sequence of length 2, it should be (height, width).
  
      Returns:
          img (PIL image), Cropped image.
      """
      if not is_pil(img):
          raise TypeError(augment_error_message.format(type(img)))
  
      if isinstance(size, int):
          size = (size, size)
      img_width, img_height = img.size
      crop_height, crop_width = size
      crop_top = int(round((img_height - crop_height) / 2.))
      crop_left = int(round((img_width - crop_width) / 2.))
      return crop(img, crop_top, crop_left, crop_height, crop_width)
function_tokens: def center_crop ( img , size ) : if not is_pil ( img ) : raise TypeError ( augment_error_message . format ( type ( img ) ) ) if isinstance ( size , int ) : size = ( size , size ) img_width , img_height = img . size crop_height , crop_width = size crop_top = int ( round ( ( img_height - crop_height ) / 2. ) ) crop_left = int ( round ( ( img_width - crop_width ) / 2. ) ) return crop ( img , crop_top , crop_left , crop_height , crop_width )