code: def test_external_source_with_iter_cupy_stream():
      with cp.cuda.Stream(non_blocking=True):
          for attempt in range(10):
              pipe = Pipeline(1, 3, 0)
  
              def get_data(i):
                  return [
                      cp.array(
                          [attempt * 100 + i * 10 + 1.5],
                          dtype=cp.float32,
                      )
                  ]
  
              pipe.set_outputs(fn.external_source(get_data))
              pipe.build()
  
              for i in range(10):
                  check_output(
                      pipe.run(),
                      [
                          np.array(
                              [attempt * 100 + i * 10 + 1.5],
                              dtype=np.float32,
                          )
                      ],
                  )
  
file_path: DALI/dali/test/python/test_external_source_cupy.py
imports: from nose.plugins.attrib import attr
  from test_external_source_impl import *
  from test_external_source_impl import use_cupy
  from test_utils import check_output, check_output_pattern
  import nvidia.dali
  from nvidia.dali import Pipeline, pipeline_def
  import nvidia.dali.fn
  from nvidia.dali.tensors import TensorGPU
  import numpy
  import cupy
label_desc: Use image node_id 1 for calling a global function with example usage: test_external_source_with_iter_cupy_stream() and returns: list