code: def video_decoder_iter(batch_size, epochs=1, device="cpu"):
      pipe = video_decoder_pipeline(
          batch_size=batch_size,
          device_id=0,
          num_threads=4,
          source=video_loader(batch_size, epochs),
          device=device,
      )
      pipe.build()
      for _ in range(
          int((epochs * len(files) + batch_size - 1) / batch_size)
      ):
          (output,) = pipe.run()
          if isinstance(output, TensorListGPU):
              output = output.as_cpu()
          for i in range(batch_size):
              yield np.array(output[i])
  
imports: import nvidia.dali.fn
  from nvidia.dali import pipeline_def
  import numpy
  import cv2
  import nvidia.dali.types
  import glob
  from itertools import cycle
  from test_utils import get_dali_extra_path, is_mulit_gpu
  from nvidia.dali.backend import TensorListGPU
  from nose2.tools import params
  from nose import SkipTest
  from nose.plugins.attrib import attr
label_desc: Use image node_id 5 for calling a global function with example usage: video_decoder_iter(batch_size, epochs, device) without return types