code: def get_transform(angle, input_size, output_size):
      cosa = math.cos(angle)
      sina = math.sin(angle)
      (out_h, out_w) = output_size[0:2]
      (in_h, in_w) = input_size[0:2]
      t1 = np.array(
          [[1, 0, -out_w * 0.5], [0, 1, -out_h * 0.5], [0, 0, 1]]
      )
      r = np.array([[cosa, -sina, 0], [sina, cosa, 0], [0, 0, 1]])
      t2 = np.array([[1, 0, in_w * 0.5], [0, 1, in_h * 0.5], [0, 0, 1]])
  
      return (np.matmul(t2, np.matmul(r, t1)))[0:2, 0:3]
  
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 4 for calling a global function with example usage: get_transform(angle, input_size, output_size) and returns: np