code: def align_mesh2stylegan(temp_tcoords, transformation_params):
      temp_tcoords = temp_tcoords.copy()
      temp_tcoords[:, 0] = (
          temp_tcoords[:, 0] - transformation_params["crop"][1]
      )
      temp_tcoords[:, 1] = (
          temp_tcoords[:, 1] - transformation_params["crop"][0]
      )
  
      temp_tcoords[:, 0] = (
          temp_tcoords[:, 0] + transformation_params["pad"][1]
      )
      temp_tcoords[:, 1] = (
          temp_tcoords[:, 1] + transformation_params["pad"][0]
      )
  
      h, w = (4096, 4096)  # transformation_params['new_size']
      transform = create_perspective_transform(
          transformation_params["quad"],
          [(0, 0), (0, h), (h, w), (w, 0)],
          splat_args=True,
      )
      for i in range(len(temp_tcoords)):
          temp_tcoords[i, 1], temp_tcoords[i, 0] = transform(
              temp_tcoords[i, 1], temp_tcoords[i, 0]
          )
  
      new_tcoords = temp_tcoords[:, ::-1] / (
          h,
          w,
      )  # transformation_params['new_size']
      new_tcoords[:, 1] = 1 - new_tcoords[:, 1]
      return new_tcoords
  
imports: import numpy
  import scipy.ndimage
  import PIL.Image
label_desc: Use image node_id 3 for calling a global function with example usage: align_mesh2stylegan(temp_tcoords, transformation_params) and returns: new_tcoords