code: def external_data_veri(external_data, batch_size):
      class ExternalSourcePipeline(Pipeline):
          def __init__(
              self, batch_size, external_data, num_threads, device_id
          ):
              super().__init__(batch_size, num_threads, device_id)
              self.input = ops.ExternalSource()
              self.batch_size_ = batch_size
              self.external_data = external_data
  
          def define_graph(self):
              self.batch = self.input()
              return [self.batch]
  
          def iter_setup(self):
              batch = []
              for elm in self.external_data:
                  batch.append(make_array(elm, dtype=datapy.uint8))
              self.feed_input(self.batch, batch)
  
      pipe = ExternalSourcePipeline(batch_size, external_data, 3, 0)
      pipe.build()
      for _ in range(10):
          out = pipe.run()
          for i in range(batch_size):
              assert out[0].as_array()[i] == external_data[i]
  
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 29 for calling a global function with example usage: external_data_veri(external_data, batch_size) and returns: list