code: def test_combine_shape_mismatch():
      np_rng = np.random.default_rng(42)
      batch_size = 8
      num_frames = 50
  
      def mt():
          return np.float32(
              np_rng.uniform(-100, 250, (num_frames, 2, 3))
          )
  
      batch0_inp = [mt() for _ in range(batch_size)]
      batch1_inp = [mt()[i:] for i in range(batch_size)]
  
      expected_msg = "The input 0 and the input 1 have different number of frames for sample 1"
      with assert_raises(RuntimeError, glob=expected_msg):
  
          @pipeline_def
          def pipeline():
              mts0, mts1 = fn.external_source(
                  lambda _: (batch0_inp, batch1_inp), num_outputs=2
              )
              return fn.transforms.combine(
                  fn.per_frame(mts0), fn.per_frame(mts1)
              )
  
          pipe = pipeline(
              batch_size=batch_size, num_threads=4, device_id=0
          )
          pipe.build()
          pipe.run()
  
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 28 for calling a global function with example usage: test_combine_shape_mismatch() and returns: np, fn