code: def make_input_pipeline_from_def(def_dict, mode, **kwargs):
      """Creates an InputPipeline object from a dictionary definition.
  
      Args:
        def_dict: A dictionary defining the input pipeline.
          It must have "class" and "params" that correspond to the class
          name and constructor parameters of an InputPipeline, respectively.
        mode: A value in tf.contrib.learn.ModeKeys
  
      Returns:
        A new InputPipeline object
      """
      if not "class" in def_dict:
          raise ValueError(
              "Input Pipeline definition must have a class property."
          )
  
      class_ = def_dict["class"]
      if not hasattr(sys.modules[__name__], class_):
          raise ValueError(
              "Invalid Input Pipeline class: {}".format(class_)
          )
  
      pipeline_class = getattr(sys.modules[__name__], class_)
  
      # Constructor arguments
      params = {}
      if "params" in def_dict:
          params.update(def_dict["params"])
      params.update(kwargs)
  
      return pipeline_class(params=params, mode=mode)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import abc
  import sys
  import six
  import tensorflow
  from tensorflow.contrib.slim.python.slim.data import tfexample_decoder
  from seq2seq.configurable import Configurable
  from seq2seq.data import split_tokens_decoder, parallel_data_provider
  from seq2seq.data.sequence_example_decoder import TFSEquenceExampleDecoder
label_desc: Use image node_id 1 for calling a global function with example usage: make_input_pipeline_from_def(def_dict, mode) and returns: pipeline_class