code: def input_fn(is_training, data_dir):
      dataset = read_tfrecord(
          format="imagenet", path=data_dir, is_training=is_training
      )
  
      return process_record_dataset(
          dataset=dataset,
          is_training=is_training,
          shuffle_buffer=_SHUFFLE_BUFFER,
          parse_record_fn=parse_record,
      )
  
imports: import os
  import argparse
  from optparse import OptionParser
  from zoo.common.nncontext import *
  from zoo.feature.image import *
  from zoo.pipeline.api.keras.metrics import *
  from zoo.pipeline.nnframes import *
  from zoo.orca import init_orca_context, stop_orca_context
  from zoo.orca.learn.tf.estimator import Estimator
  from zoo.orca.learn.trigger import EveryEpoch, SeveralIteration
  from zoo.orca.data.image import write_tfrecord, read_tfrecord
  from inception_preprocessing import preprocess_for_train, preprocess_for_eval
  from nets import inception_v1
  import tensorflow
  from math import ceil
label_desc: Use image node_id 5 for calling a global function with example usage: input_fn(is_training, data_dir) and returns: process_record_dataset