code: def many_input_pipeline(
      def_for_dataset, device, sources, input_names, batches
  ):
      """Pipeline accepting multiple inputs via external source
  
      Parameters
      ----------
      def_for_dataset : bool
           True if this pipeline will be converted to TF Dataset
      device : str
          device that the Dataset will be placed ("cpu" or "gpu")
      sources : list of callables
          callbacks for the external sources in baseline pipeline otherwise None
      input_names : list of str
          Names of inputs placeholder for TF
      """
      inputs = []
      if def_for_dataset:
          for input_name, batch in zip(input_names, batches):
              if batch == "dataset":
                  # Special value used in tests, reroute it to the default
                  batch = None
              input = fn.external_source(name=input_name, batch=batch)
              input = input if device == "cpu" else input.gpu()
              inputs.append(input)
      else:
          for source in sources:
              input = fn.external_source(source=source, batch=False)
              input = input if device == "cpu" else input.gpu()
              inputs.append(input)
      processed = []
      for input in inputs:
          processed.append(fn.cast(input + 10, dtype=dali.types.INT32))
      results = fn.pad(inputs + processed)
      return tuple(results)
  
imports: import numpy
  import nvidia.dali
  import nvidia.dali.fn
  import nvidia.dali.plugin.tf
  import tensorflow
  from nose.tools import nottest
  from nvidia.dali import pipeline_def
  from test_utils import RandomlyShapedDataIterator
label_desc: Use image node_id 6 for calling a global function with example usage: many_input_pipeline(def_for_dataset, device, sources, input_names, batches) and returns: tuple