code: def run_decode_fused(
      test_fun, path, img_type, batch, device, threads, validation_fun
  ):
      data_path = os.path.join(test_data_root, path, img_type)
      pipe = test_fun(
          data_path=data_path,
          batch_size=batch,
          num_threads=threads,
          device_id=0,
          device=device,
          prefetch_queue_depth=1,
      )
      pipe.build()
      iters = math.ceil(pipe.epoch_size("Reader") / batch)
      for _ in range(iters):
          out_1, out_2 = pipe.run()
          for img_1, img_2 in zip(out_1, out_2):
              img_1 = to_array(img_1)
              img_2 = to_array(img_2)
              assert validation_fun(img_1, img_2)
  
imports: import glob
  import math
  import numpy
  import nvidia.dali.backend
  import nvidia.dali.fn
  import nvidia.dali.types
  import os
  import random
  from nvidia.dali import pipeline_def
  from nose2.tools import params
  from nose_utils import assert_raises
  from test_utils import check_output_pattern
  from test_utils import compare_pipelines
  from test_utils import get_dali_extra_path
  from test_utils import to_array
label_desc: Use image node_id 8 for calling a global function with example usage: run_decode_fused(test_fun, path, img_type, batch, device, threads, validation_fun) without return types