code: def parse_record(raw_record, is_training, dtype):
      image_buffer, label = _parse_example_proto(raw_record)
  
      image = preprocess_image(
          image_buffer=image_buffer,
          output_height=_DEFAULT_IMAGE_SIZE,
          output_width=_DEFAULT_IMAGE_SIZE,
          is_training=is_training,
      )
      image = tf.cast(image, dtype)
  
      label = tf.cast(tf.reshape(label, shape=[1]), dtype=tf.int32) - 1
  
      return image, label
  
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 3 for calling a global function with example usage: parse_record(raw_record, is_training, dtype) and returns: image,  label