code: def run_and_check(pipe, ref_iterable):
      iter_ref = iter(ref_iterable)
      i = 0
      while True:
          try:
              pipe_out = pipe.run()
              data = next(iter_ref)
              data = asnumpy(data, iter_ref.device)
              check_output(pipe_out, data)
              i += 1
          except StopIteration:
              break
      assert i == len(ref_iterable)
  
file_path: DALI/dali/test/python/test_external_source_pytorch_dlpack.py
imports: import numpy
  import nvidia.dali.fn
  import nvidia.dali.ops
  import torch
  from nvidia.dali.backend_impl import *
  from nvidia.dali import Pipeline
  from torch.utils.dlpack import to_dlpack, from_dlpack
  from test_utils import check_output
label_desc: Use image node_id 2 for calling a global function with example usage: run_and_check(pipe, ref_iterable) without return types