code: def augment_img(img, augmentation):
      flip, rotate, rescale = np.array(augmentation).squeeze()
      rimg = img.rescale(rescale)
      rimg = rimg.rotate_ccw_about_centre(rotate)
      crimg = rimg.warp_to_shape(
          img.shape,
          Translation(
              -np.array(img.shape) / 2 + np.array(rimg.shape) / 2
          ),
      )
      if flip > 0.5:
          crimg = crimg.mirror()
  
      img = crimg
  
      return img
  
file_path: insightface/reconstruction/ostec/external/landmark_detector/data_provider.py
imports: import tensorflow
  import numpy
  from menpo.transform import Translation
  from external.landmark_detector.flags import FLAGS
label_desc: Use image node_id 1 for calling a global function with example usage: augment_img(img, augmentation) and returns: img