code: def check_combine_transforms(
      num_transforms=2,
      ndim=2,
      reverse_order=False,
      batch_size=1,
      num_threads=4,
      device_id=0,
  ):
      pipe = Pipeline(
          batch_size=batch_size,
          num_threads=num_threads,
          device_id=device_id,
      )
      with pipe:
          transforms = [
              fn.random.uniform(
                  range=(-1, 1), shape=(ndim, ndim + 1), seed=1234
              )
              for _ in range(num_transforms)
          ]
          T = fn.transforms.combine(*transforms)
      pipe.set_outputs(T, *transforms)
      pipe.build()
      outs = pipe.run()
      for idx in range(batch_size):
          num_mats = len(outs) - 1
          assert num_mats >= 2
          mats = [np.identity(ndim + 1) for _ in range(num_mats)]
          for in_idx in range(len(mats)):
              mats[in_idx][:ndim, :] = outs[1 + in_idx].at(idx)
  
          # by default we want to access them in opposite order
          if not reverse_order:
              mats.reverse()
          ref_mat = np.identity(ndim + 1)
          for mat in mats:
              ref_mat = np.dot(mat, ref_mat)
  
          assert np.allclose(
              outs[0].at(idx), ref_mat[:ndim, :], atol=1e-6
          )
  
imports: import random
  import warnings
  import numpy
  from scipy.spatial.transform import Rotation
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops.transforms
  import nvidia.dali.ops
  import nvidia.dali.fn
  from nvidia.dali import pipeline_def
  from sequences_test_utils import ArgData, ArgDesc, sequence_suite_helper, ArgCb, ParamsProvider
  from nose_utils import assert_raises
label_desc: Use image node_id 22 for calling a global function with example usage: check_combine_transforms(num_transforms, ndim, reverse_order, batch_size, num_threads, device_id) without return types