code: def test_external_source_with_iter():
      for attempt in range(10):
          pipe = Pipeline(1, 3, 0)
  
          pipe.set_outputs(
              fn.external_source(
                  lambda i: [
                      make_array(
                          [attempt * 100 + i * 10 + 1.5],
                          dtype=datapy.float32,
                      )
                  ]
              )
          )
          pipe.build()
  
          for i in range(10):
              check_output(
                  pipe.run(),
                  [
                      np.array(
                          [attempt * 100 + i * 10 + 1.5],
                          dtype=np.float32,
                      )
                  ],
              )
  
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 21 for calling a global function with example usage: test_external_source_with_iter() without return types