code: def test_3d_sequence():
      rng = random.Random(42)
      num_batches = 4
      max_batch_size = 8
      max_frames_num = 32
      input_layout = "FDHWC"
      np_rng = np.random.default_rng(42)
  
      def get_random_sample():
          num_frames = rng.randint(1, max_frames_num)
          d, h, w = tuple(rng.randint(10, 50) for _ in range(3))
          return np.int32(
              np_rng.uniform(0, 255, (num_frames, d, h, w, 3))
          )
  
      def get_random_batch():
          return [
              get_random_sample()
              for _ in range(rng.randint(1, max_batch_size))
          ]
  
      input_cases = [
          ArgData(
              desc=ArgDesc(0, "F", "", input_layout),
              data=[get_random_batch() for _ in range(num_batches)],
          )
      ]
  
      def random_angle(sample_desc):
          return np.array(
              sample_desc.rng.uniform(-180.0, 180.0), dtype=np.float32
          )
  
      def random_axis(sample_desc):
          return np.array(
              [sample_desc.rng.uniform(-1, 1) for _ in range(3)],
              dtype=np.float32,
          )
  
      test_cases = [
          (
              dali.fn.rotate,
              {
                  "angle": 45.0,
                  "axis": np.array([1, 0, 0], dtype=np.float32),
              },
              [],
          ),
          (
              dali.fn.rotate,
              {"size": (50, 30, 20)},
              [
                  ArgCb("angle", random_angle, True),
                  ArgCb("axis", random_axis, True),
              ],
          ),
          (
              dali.fn.rotate,
              {},
              RotatePerFrameParamsProvider(
                  [
                      ArgCb("angle", random_angle, True),
                      ArgCb("axis", random_axis, True),
                  ]
              ),
          ),
      ]
      yield from sequence_suite_helper(rng, input_cases, test_cases)
  
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 16 for calling a global function with example usage: test_3d_sequence() and returns: np, unknown, np, np