code: def get(net, img, keypoints):
      dst_pts = np.array(
          [
              [38.2946, 51.6963],
              [73.5318, 51.5014],
              [56.0252, 71.7366],
              [41.5493, 92.3655],
              [70.7299, 92.2041],
          ],
          dtype=np.float32,
      )
      input_size = 256
      local_rank = 0
  
      new_size = 144
      dst_pts[:, 0] += (new_size - 112) // 2
      dst_pts[:, 1] += 8
      dst_pts[:, :] *= input_size / float(new_size)
      tf = sktrans.SimilarityTransform()
      tf.estimate(keypoints, dst_pts)
      tform = tf.params[0:2, :]
      img = cv2.warpAffine(img, tform, (input_size,) * 2)
      img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
      img = np.transpose(img, (2, 0, 1))
      img = torch.from_numpy(img).unsqueeze(0).float()
      img.div_(255).sub_(0.5).div_(0.5)
      img_local = img.to(local_rank)
      with torch.no_grad():
          if not net.use_eyes:
              pred1, pred2, meta = net(img_local, is_flip=False)
          else:
              pred1, pred2, meta, eye_verts, eye_points = net(
                  img_local, is_flip=False
              )
      pred_verts = net.convert_verts(pred1, meta)
      tform = torch.from_numpy(tform.reshape(1, 2, 3))
      pred_verts2d = net.convert_2d(pred2, tform, meta)
      verts = pred_verts[0]
      verts2d = pred_verts2d[0]
      R, t = net.solve_one(verts, verts2d)
      if not net.use_eyes:
          return verts, verts2d
      else:
          R_t = np.zeros((4, 4), dtype=np.float32)
          R_t[:3, :3] = R
          R_t[3, :3] = t
          R_t[3, 3] = 1.0
          eye_verts, eye_verts2d, gaze_l, gaze_r = net.convert_eyes(
              eye_verts, eye_points, R_t, tform
          )
          return verts, verts2d, eye_verts, eye_verts2d, gaze_l, gaze_r
  
imports: import os
  import time
  import timm
  import glob
  import numpy
  import os.path
  import cv2
  import torch
  import torch.distributed
  from torch import nn
  from pathlib import Path
  from backbones import get_network
  from skimage import transform
  from scipy.spatial.transform import Rotation
label_desc: Use image node_id 5 for calling a global function with example usage: get(net, img, keypoints) and returns: verts,  verts2d, verts,  verts2d,  eye_verts,  eye_verts2d,  gaze_l,  gaze_r