code: def test_source_info(device):
      filenames = glob.glob(
          f"{get_dali_extra_path()}/db/video/[cv]fr/*.mp4"
      )
      # filter out HEVC because some GPUs do not support it
      filenames = filter(
          lambda filename: "hevc" not in filename, filenames
      )
      # mpeg4 is not yet supported in the CPU operator itself
      filenames = filter(
          lambda filename: "mpeg4" not in filename, filenames
      )
  
      files = list(filenames)
  
      @pipeline_def
      def test_pipeline():
          videos = fn.experimental.readers.video(
              device=device,
              filenames=files,
              sequence_length=1,
              step=10000000,  # make sure that each video has only one valid sequence
          )
          return videos
  
      batch_size = 4
      p = test_pipeline(
          batch_size=batch_size, num_threads=1, device_id=0
      )
      p.build()
  
      samples_read = 0
      while samples_read < len(files):
          o = p.run()
          for idx, t in enumerate(o[0]):
              assert (
                  t.source_info()
                  == files[(samples_read + idx) % len(files)]
              )
          samples_read += batch_size
  
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 11 for calling a global function with example usage: test_source_info(device) and returns: videos