code: def test_external_source_collection():
      pipe = Pipeline(1, 3, 0)
  
      batches = [
          [make_array([1.5, 2.5], dtype=datapy.float32)],
          [make_array([-1, 3.5, 4.5], dtype=datapy.float32)],
      ]
  
      pipe.set_outputs(fn.external_source(batches))
      pipe.build()
      run_and_check(pipe, batches)
  
imports: import functools
  import numpy
  import nvidia.dali.fn
  import nvidia.dali.ops
  from nvidia.dali import Pipeline
  from nose_utils import assert_raises
  from test_utils import check_output
label_desc: Use image node_id 17 for calling a global function with example usage: test_external_source_collection() without return types