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 cv2
  import numpy
  import math
  import os
  import random
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.types
  import nvidia.dali
  from test_utils import compare_pipelines
  from sequences_test_utils import ArgData, ArgDesc, ArgCb, ParamsProvider, get_video_input_cases, sequence_suite_helper
label_desc: Use image node_id 5 for calling a global function with example usage: ToCVMatrix(matrix) and returns: result