def crop_face(img, face_loc):
  """
  Crops face from the given image.

  Args:
    img: Image to crop face from.
    face_loc: Location of the face on the given image.

  Returns:
    Image with the cropped face.
  """

  return img[face_loc['y']:face_loc['y'] + face_loc['height'], face_loc['x']:face_loc['x'] + face_loc['width']]