code: def test_external_source_gen_function_cycle():
      pipe = Pipeline(1, 3, 0)
  
      def gen():
          for i in range(5):
              yield [make_array([i + 1.5], dtype=datapy.float32)]
  
      pipe.set_outputs(fn.external_source(gen, cycle=True))
      pipe.build()
  
      for _ in range(3):
          for i in range(5):
              check_output(
                  pipe.run(), [np.array([i + 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 24 for calling a global function with example usage: test_external_source_gen_function_cycle() without return types