def METHOD_NAME(img, size):
  """resize the images.
  Args:
    img: a pillow image
    size: the size of the image (both x & y)
  Returns:
    nothing
  """
  small_side = min(img.size)
  center = img.size[0] / 2
  margin_left = center - small_side / 2
  margin_right = margin_left + small_side
  img = img.METHOD_NAME((margin_left, 0, margin_right, small_side))
  img = img.resize((size, size), Image.ANTIALIAS)
  return img