code: def config_option_parser():
      parser = OptionParser()
      parser.add_option(
          "-f",
          "--folder",
          type=str,
          dest="folder",
          default="",
          help="raw ImageNet data, it includes train and val folder with format of"
          "train/n03062245/n03062245_4620.JPEG,"
          "validation/ILSVRC2012_val_00000001.JPEG",
      )
      parser.add_option(
          "--imagenet",
          type=str,
          dest="imagenet",
          default="/tmp/imagenet",
          help="generated imagenet TFRecord path",
      )
      parser.add_option(
          "--model",
          type=str,
          dest="model",
          default="",
          help="model snapshot location",
      )
      parser.add_option(
          "--checkpoint",
          type=str,
          dest="checkpoint",
          default="",
          help="where to cache the model",
      )
      parser.add_option(
          "-e",
          "--maxEpoch",
          type=int,
          dest="maxEpoch",
          default=1,
          help="epoch numbers",
      )
      parser.add_option(
          "-i",
          "--maxIteration",
          type=int,
          dest="maxIteration",
          default=3100,
          help="iteration numbers",
      )
      parser.add_option(
          "-l",
          "--learningRate",
          type=float,
          dest="learningRate",
          default=0.01,
          help="learning rate",
      )
      parser.add_option(
          "--warmupEpoch",
          type=int,
          dest="warmupEpoch",
          default=0,
          help="warm up epoch numbers",
      )
      parser.add_option(
          "--maxLr",
          type=float,
          dest="maxLr",
          default=0.0,
          help="max Lr after warm up",
      )
      parser.add_option(
          "-b",
          "--batchSize",
          type=int,
          dest="batchSize",
          help="batch size",
      )
      parser.add_option(
          "--weightDecay",
          type=float,
          dest="weightDecay",
          default=0.0001,
          help="weight decay",
      )
      parser.add_option(
          "--checkpointIteration",
          type=int,
          dest="checkpointIteration",
          default=620,
          help="checkpoint interval of iterations",
      )
      parser.add_option(
          "--resumeTrainingCheckpoint",
          type=str,
          dest="resumeTrainingCheckpoint",
          default=None,
          help="an analytics zoo checkpoint path for resume training, usually contains"
          + "a file named model.$iter_num and a file named"
          + " optimMethod-TFParkTraining.$iter_num",
      )
      parser.add_option(
          "--resumeTrainingVersion",
          type=int,
          dest="resumeTrainingVersion",
          default=None,
          help="the version of checkpoint file, should be the $iter_num"
          + " in model.$iter_num",
      )
      parser.add_option(
          "--cluster_mode",
          type=str,
          default="local",
          help="The mode for the Spark cluster.",
      )
      parser.add_option(
          "--worker_num",
          type=int,
          default=1,
          help="The number of slave nodes to be used in the cluster."
          "You can change it depending on your own cluster setting.",
      )
      parser.add_option(
          "--cores",
          type=int,
          default=4,
          help="The number of cpu cores you want to use on each node. "
          "You can change it depending on your own cluster setting.",
      )
      parser.add_option(
          "--memory",
          type=str,
          default="10g",
          help="The memory you want to use on each node. "
          "You can change it depending on your own cluster setting.",
      )
      parser.add_option(
          "--py_files",
          type=str,
          default=None,
          help="The python files you need.",
      )
  
      return parser
  
imports: import os
  import argparse
  from optparse import OptionParser
  from bigdl.dllib.nncontext import *
  from bigdl.dllib.feature.image import *
  from bigdl.dllib.keras.metrics import *
  from bigdl.dllib.nnframes import *
  from bigdl.dllib.utils.log4Error import invalidInputError
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca.learn.tf.estimator import Estimator
  from bigdl.orca.learn.trigger import EveryEpoch, SeveralIteration
  from bigdl.orca.data.image import write_tfrecord, read_tfrecord
  from inception_preprocessing import preprocess_for_train, preprocess_for_eval
  from tensorflow.contrib.slim.python.slim.nets import inception_v1
  import tensorflow
  from math import ceil
label_desc: Use image node_id 8 for calling a global function with example usage: config_option_parser() and returns: parser