code: def test_ndim_data_mismatch():
      batch_size = 2
      src_data = [
          [
              [np.ones((120, 120, 3), dtype=np.uint8)] * batch_size,
              [np.ones((120, 120), dtype=np.uint8)] * batch_size,
          ]
      ]
      src_pipe = Pipeline(batch_size, 1, 0)
      src_ext1, src_ext2 = fn.external_source(
          source=src_data,
          num_outputs=2,
          dtype=DALIDataType.UINT8,
          ndim=3,
      )
      src_pipe.set_outputs(src_ext1, src_ext2)
      src_pipe.build()
      src_pipe.run()
  
imports: import random
  import nvidia.dali.fn
  import nvidia.dali.ops
  import nvidia.dali.types
  import numpy
  from nvidia.dali import Pipeline, pipeline_def
  from test_utils import check_batch
  from nose_utils import raises, assert_warns, assert_raises
  from nvidia.dali.types import DALIDataType
  from numpy.random import default_rng
label_desc: Use image node_id 20 for calling a global function with example usage: test_ndim_data_mismatch() without return types