code: def run_decode(
      _img_type, data_path, batch, device, threads, memory_stats=False
  ):
      pipe = decoder_pipe(
          data_path=data_path,
          batch_size=batch,
          num_threads=threads,
          device_id=0,
          device=device,
          memory_stats=memory_stats,
          prefetch_queue_depth=1,
      )
      pipe.build()
      iters = math.ceil(pipe.epoch_size("Reader") / batch)
      for _ in range(iters):
          outs = pipe.run()
          del outs
      del pipe
  
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 3 for calling a global function with example usage: run_decode(_img_type, data_path, batch, device, threads, memory_stats) without return types