code: def crop(img, center, scale, output_size, rot=0):
      trans = get_affine_transform(center, scale, rot, output_size)
  
      dst_img = cv2.warpAffine(
          img,
          trans,
          (int(output_size[1]), int(output_size[0])),
          flags=cv2.INTER_LINEAR,
      )
  
      return dst_img
  
file_path: insightface/parsing/dml_csr/utils/transforms.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import cv2
label_desc: Use image node_id 7 for calling a global function with example usage: crop(img, center, scale, output_size, rot) and returns: dst_img