code: def _test_feed_input(device, is_serialized):
      src_pipe, batch_size = build_src_pipe(device)
  
      dst_pipe = Pipeline(
          batch_size, 1, 0, exec_async=False, exec_pipelined=False
      )
      dst_pipe.set_outputs(
          fn.external_source(name="ext", device=device)
      )
      if is_serialized:
          serialized = dst_pipe.serialize()
          dst_pipe = None
          dst_pipe = Pipeline.deserialize(
              serialized_pipeline=serialized,
              batch_size=batch_size,
              num_threads=1,
              device_id=0,
              exec_async=False,
              exec_pipelined=False,
          )
          dst_pipe.build()
      else:
          dst_pipe.build()
      for _ in range(3):
          out1 = src_pipe.run()
          dst_pipe.feed_input("ext", out1[0])
          out2 = dst_pipe.run()
          check_batch(out2[0], out1[0], batch_size, 0, 0, "XY")
  
imports: import random
  import nvidia.dali.fn
  import nvidia.dali.ops
  import nvidia.dali.types
  import numpy
  from nvidia.dali import Pipeline, pipeline_def
  from test_utils import check_batch
  from nose_utils import raises, assert_warns, assert_raises
  from nvidia.dali.types import DALIDataType
  from numpy.random import default_rng
label_desc: Use image node_id 2 for calling a global function with example usage: _test_feed_input(device, is_serialized) without return types