code: def compare(tl1, tl2):
      tl1_cpu = tl1.as_cpu()
      tl2_cpu = tl2.as_cpu()
      assert len(tl1_cpu) == len(tl2_cpu)
      for i in range(0, len(tl1_cpu)):
          assert_array_equal(
              tl1_cpu.at(i),
              tl2_cpu.at(i),
              "cached and non-cached images differ",
          )
  
file_path: DALI/dali/test/python/test_nvjpeg_cache.py
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.types
  from numpy.testing import assert_array_equal
  from test_utils import get_dali_extra_path
label_desc: Use image node_id 1 for calling a global function with example usage: compare(tl1, tl2) without return types