code: def trans_points3d(pts, M):
      scale = np.sqrt(M[0][0] * M[0][0] + M[0][1] * M[0][1])
      # print(scale)
      new_pts = np.zeros(shape=pts.shape, dtype=np.float32)
      for i in range(pts.shape[0]):
          pt = pts[i]
          new_pt = np.array([pt[0], pt[1], 1.0], dtype=np.float32)
          new_pt = np.dot(M, new_pt)
          # print('new_pt', new_pt.shape, new_pt)
          new_pts[i][0:2] = new_pt[0:2]
          new_pts[i][2] = pts[i][2] * scale
  
      return new_pts
  
file_path: insightface/python-package/insightface/utils/face_align.py
imports: import cv2
  import numpy
  from skimage import transform
label_desc: Use image node_id 7 for calling a global function with example usage: trans_points3d(pts, M) and returns: new_pts