code: def update_transformation_matrix(M, m):
      # extend M and m to 3x3 by adding an [0,0,1] to their 3rd row
      M_ = np.concatenate([M, np.zeros([1, 3])], axis=0)
      M_[-1, -1] = 1
      m_ = np.concatenate([m, np.zeros([1, 3])], axis=0)
      m_[-1, -1] = 1
  
      M_new = np.matmul(m_, M_)
      return M_new[0:2, :]
  
file_path: PaddleHub/modules/video/Video_editing/SkyAR/utils.py
imports: import cv2
  import numpy
  from sklearn.neighbors import KernelDensity
label_desc: Use image node_id 2 for calling a global function with example usage: update_transformation_matrix(M, m) and returns: M_new