code: def ToCVMatrix(matrix):
      offset = np.matmul(matrix, np.array([[0.5], [0.5], [1]]))
      result = matrix.copy()
      result[0][2] = offset[0] - 0.5
      result[1][2] = offset[1] - 0.5
      return result
  
imports: import nose_utils
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.fn
  import nvidia.dali.types
  import numpy
  import math
  import os
  import cv2
  from sequences_test_utils import video_suite_helper, SampleDesc, ArgCb
  from test_utils import compare_pipelines
  import random
label_desc: Use image node_id 3 for calling a global function with example usage: ToCVMatrix(matrix) and returns: result