code: def run(self, im, reconstruction_dict, face_mask=None):
      start = time.time()
      print("Preprocessing...", end=" ")
      # GANFit compatibility
      if not "vertices" in reconstruction_dict:  # GANFit
          reconstruction_dict["vertices"] = reconstruction_dict[
              "tmesh"
          ].points
          reconstruction_dict["trilist"] = reconstruction_dict[
              "tmesh"
          ].trilist
      if not "vertices_rotated" in reconstruction_dict:  # GANFit
          reconstruction_dict["vertices_rotated"] = apply_camera_only3d(
              reconstruction_dict["vertices"],
              reconstruction_dict["camera_params"],
          )
      if not "euler_angles" in reconstruction_dict:  # GANFit
          reconstruction_dict["euler_angles"] = get_pose(
              reconstruction_dict["camera_params"]
          )
  
      # Prepare Textured Trimesh with visible part of the face
      face = self.get_tmesh(im, reconstruction_dict, face_mask)
  
      img_uv_src = face.img_uv_src.copy()
      angle_uv_src = face.angle_uv_src.copy()
      print("Done in %.2f secs" % (time.time() - start))
  
      # Prepare view angle maps
      start = time.time()
      print("Building a Visibility Index...", end=" ")
      angle_uv = {}
      key_list = ["src"]
      angle_uv_list = [
          np.clip(angle_uv_src.pixels * face.coef_dict()["src"], -1, 1)
      ]
  
      view_angle_src_full = self.camera_tri_angle_src(
          face.tmesh_rotated
      )
      tcoord_sampling = np.round(
          self.tcoords.points * angle_uv_src.shape
      ).astype(np.int)
      view_angle_src_full[self.mask] = angle_uv_src.pixels[
          0,
          angle_uv_src.shape[0] - tcoord_sampling[:, 1],
          tcoord_sampling[:, 0],
      ]
      view_angle_src_full[
          ~self.tight_mask
      ] = -1  # Only take tight crop from the original image
  
      angle_list = [
          np.clip(view_angle_src_full * face.coef_dict()["src"], -1, 1)
      ]
      dummy_im = im_menpo2PIL(img_uv_src)
  
      # For each view calculate angles towards the camera (Visibility scores)
      for key, trg_angle in face.rotation_dict().items():
          view_angle_trg = self.camera_tri_angle(
              face.tmesh, pose_angle_deg=trg_angle
          )
          view_angle_trg = np.clip(
              view_angle_trg * face.coef_dict()[key], -1, 1
          )
          _, projected_mesh = rasterize_image(
              face.tmesh,
              self.img_shape,
              pose_angle_deg=trg_angle,
              cam_dist=4.5,
          )
          _, _, transformation_params = align_im2stylegan(
              dummy_im,
              dummy_im,
              projected_mesh[self.lms_ind, :2][:, ::-1],
          )
          aligned_meshes = align_mesh2stylegan(
              projected_mesh[:, :2], transformation_params
          )
          out_of_plane = (
              (aligned_meshes[:, 0] > 1)
              | (aligned_meshes[:, 1] > 1)
              | (aligned_meshes[:, 0] < 0)
              | (aligned_meshes[:, 1] < 0)
          )
  
          view_angle_trg[out_of_plane] = -1
          angle_list.append(view_angle_trg)
          angle_uv[key] = self.render_colored_image(
              view_angle_trg[self.mask]
          )
          angle_uv_list.append(angle_uv[key].pixels)
          key_list.append(key)
  
      # Building a Visibility Index
      max_ind = np.argmax(angle_list, axis=0)
      max_ind_one_hot = np.zeros((max_ind.size, max_ind.max() + 1))
      max_ind_one_hot[np.arange(max_ind.size), max_ind.flatten()] = 1
      max_ind_one_hot = max_ind_one_hot.reshape(max_ind.shape + (-1,))
      mask_out_all = np.max(angle_list, axis=0) == -1
      max_ind_one_hot[mask_out_all, :] = 0
  
      uv_blending = {}
      for i, key in enumerate(key_list):
          uv_blending[key] = np.zeros(
              max_ind_one_hot[:, i].shape, np.float
          )
          for j in range(i):
              uv_blending[key] += max_ind_one_hot[:, j]
          uv_blending[key] = np.clip(uv_blending[key], 0, 1)
  
      face.uv_blending = uv_blending
      face.angle_uv_list = angle_uv_list
      print("Done in %.2f secs" % (time.time() - start))
  
      # Projecting for each of the predefined views
      start = time.time()
      print("Projecting...")
      results_dict = {}
      for key, trg_angle in face.rotation_dict().items():
          face, results_dict[key] = self.run_iteration(
              face, key, trg_angle
          )
  
      final_uv = results_dict[key]["final_uv"]
      print("Done in %.2f secs" % (time.time() - start))
  
      if self.args.frontalize:
          start = time.time()
          print("Frontalizing...")
          imgs = {}
          masks = {}
          heatmaps = {}
          self.projector.perceptual_model.assign_placeholder(
              "id_loss", self.args.use_id_loss_frontalize
          )
  
          (
              imgs["frontal"],
              masks["frontal"],
              heatmaps["frontal"],
              _,
          ) = self.create_align_syn(
              face,
              trg_angle=[0, 0, 0],
              include_mask=face.uv_blending[key],
          )
          (
              generated_imgs,
              generated_dlatents,
          ) = self.projector.run_projection(
              imgs,
              masks,
              heatmaps,
              face.id_features,
              iterations=self.args.iterations_frontalize,
          )
          results_dict["frontal"] = im_PIL2menpo(
              generated_imgs["frontal"]
          )
          results_dict["frontalize"] = [
              imgs,
              masks,
              heatmaps,
              face.id_features,
          ]
          print("Done in %.2f secs" % (time.time() - start))
  
      return final_uv, results_dict
  
imports: from utils.align2stylegan import align_im2stylegan, align_mesh2stylegan
  from core.projection_handler import Projection_Handler
  from skimage.morphology import remove_small_holes
  import time
  from utils.ganfit_camera import apply_camera_only3d, get_pose
  from utils.utils import *
  from core.arcface_handler import Arcface_Handler
  from utils import generate_heatmap
label_desc: Use image node_id 11 for calling the Operator obj's underlying member method code with example usage: obj.run(im, reconstruction_dict, face_mask) and returns: final_uv,  results_dict