code: def _generate_input_fn(
      training_dir, training_filename, hyperparameters
  ):
      input_tensor_name = hyperparameters["input_tensor_name"]
  
      training_set = (
          tf.contrib.learn.datasets.base.load_csv_with_header(
              filename=os.path.join(training_dir, training_filename),
              target_dtype=np.int,
              features_dtype=np.float32,
          )
      )
  
      return tf.estimator.inputs.numpy_input_fn(
          x={input_tensor_name: np.array(training_set.data)},
          y=np.array(training_set.target),
          num_epochs=None,
          shuffle=True,
      )()
  
file_path: sagemaker-python-sdk/tests/data/iris/iris-dnn-classifier.py
imports: from __future__ import absolute_import
  import numpy
  import os
  import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: _generate_input_fn(training_dir, training_filename, hyperparameters) and returns: tf