code: def test_es_pipe():
      @pipeline_def(batch_size=10, device_id=0, num_threads=4)
      def es_pipe():
          single_output = fn.external_source(
              source=lambda: np.array([0]), batch=False
          )
          out_1, out_2 = fn.external_source(
              source=lambda: (np.array([1]), np.array([2])),
              num_outputs=2,
              batch=False,
          )
          out_3, out_4 = fn.external_source(
              source=lambda: [np.array([3]), np.array([4])],
              num_outputs=2,
              batch=False,
          )
          expect_data_node(single_output, out_1, out_2, out_3, out_4)
          return single_output, out_1, out_2, out_3, out_4
  
      pipe = es_pipe()
      expect_pipeline(pipe)
      pipe.build()
      out0, out1, out2, out3, out4 = pipe.run()
      expect_tensor_list(out0, out1, out2, out3, out4)
      assert np.array_equal(
          np.array(out0.as_tensor()), np.full((10, 1), 0)
      )
      assert np.array_equal(
          np.array(out1.as_tensor()), np.full((10, 1), 1)
      )
      assert np.array_equal(
          np.array(out2.as_tensor()), np.full((10, 1), 2)
      )
      assert np.array_equal(
          np.array(out3.as_tensor()), np.full((10, 1), 3)
      )
      assert np.array_equal(
          np.array(out4.as_tensor()), np.full((10, 1), 4)
      )
  
imports: from pathlib import Path
  import numpy
  from typing import cast, Sequence, Union
  from nvidia.dali import fn, ops
  from nvidia.dali import types, tensors
  from nvidia.dali.data_node import DataNode
  from nvidia.dali.pipeline import pipeline_def, Pipeline
  from test_utils import get_dali_extra_path, check_numba_compatibility_cpu
  from nose.plugins.attrib import attr
label_desc: Use image node_id 9 for calling a global function with example usage: test_es_pipe() and returns: single_output,  out_1,  out_2,  out_3,  out_4