code: def get_3d_lin_rotation(angle, axis):
      # mirrors transform.h:rotation3D
      if not angle:
          return np.eye((3, 3), dtype=np.float32)
      axis_norm = np.linalg.norm(axis)
      axis = [dim / axis_norm for dim in axis]
      u, v, w = axis
      cosa = math.cos(angle)
      sina = math.sin(angle)
      return np.array(
          [
              [
                  u * u + (v * v + w * w) * cosa,
                  u * v * (1 - cosa) - w * sina,
                  u * w * (1 - cosa) + v * sina,
              ],
              [
                  u * v * (1 - cosa) + w * sina,
                  v * v + (u * u + w * w) * cosa,
                  v * w * (1 - cosa) - u * sina,
              ],
              [
                  u * w * (1 - cosa) - v * sina,
                  v * w * (1 - cosa) + u * sina,
                  w * w + (u * u + v * v) * cosa,
              ],
          ],
          dtype=np.float32,
      )
  
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 2 for calling a global function with example usage: get_3d_lin_rotation(angle, axis) and returns: np, np