code: def check_dim_mismatch(device, test_data_root, names):
      pipe = Pipeline(2, 2, 0)
      pipe.set_outputs(
          fn.readers.numpy(
              device=device, file_root=test_data_root, files=names
          )
      )
      err = None
      try:
          pipe.build()
          pipe.run()
      except RuntimeError as thrown:
          err = thrown
      finally:
          del pipe
      # asserts should not be in except block to avoid printing nested exception on failure
      assert err, "Exception not thrown"
      assert "Inconsistent data" in str(
          err
      ), "Unexpected error message: {}".format(err)
  
imports: from nvidia.dali import Pipeline, pipeline_def
  import nvidia.dali.fn
  import nvidia.dali.types
  import nvidia.dali.backend
  import numpy
  from numpy.testing import assert_array_equal
  import os
  import platform
  import random
  import tempfile
  from nose_utils import assert_raises
  from nose import SkipTest
  from nose2.tools import params, cartesian_params
  from test_utils import compare_pipelines, to_array
label_desc: Use image node_id 13 for calling a global function with example usage: check_dim_mismatch(device, test_data_root, names) without return types