code: def parse_record(
      raw_record, is_training, dtype, eval_image_size, normalize
  ):
      """Parses a record containing a training example of an image.
  
      The input record is parsed into a label and image, and the image is passed
      through preprocessing steps (cropping, flipping, and so on).
  
      Args:
        raw_record: scalar Tensor tf.string containing a serialized
          Example protocol buffer.
        is_training: A boolean denoting whether the input is for training.
        dtype: data type to use for images/features.
  
      Returns:
        Tuple with processed image tensor and one-hot-encoded label tensor.
      """
      image_buffer, label, bbox = _parse_example_proto(raw_record)
  
      image = preprocess_image(
          image_buffer=image_buffer,
          bbox=bbox,
          output_height=eval_image_size,
          output_width=eval_image_size,
          num_channels=3,
          is_training=is_training,
          resize_side_min=eval_image_size * 8 // 7,
      )
  
      if normalize == 0:
          image = _mean_image_subtraction(image, _CHANNEL_MEANS0, 3)
      elif normalize == 1:
          image = _mean_image_subtraction(image, _CHANNEL_MEANS0, 3)
          image = tf.reverse(image, axis=[-1])
      elif normalize == 2:
          image /= 255.0
          image -= 0.5
          image *= 2.0
      elif normalize == 3:
          image /= 255.0
          image = _mean_image_subtraction(
              image, _CHANNEL_MEANS3, 3, _CHANNEL_STDS3
          )
      elif normalize == 4:
          image = _mean_image_subtraction(image, _CHANNEL_MEANS4, 3)
          image = tf.reverse(image, axis=[-1])
      elif normalize == 5:
          image /= 255.0
          image = _mean_image_subtraction(
              image, _CHANNEL_MEANS5, 3, _CHANNEL_STDS5
          )
  
      image = tf.cast(image, dtype)
      label -= 1
  
      return image, label
  
file_path: tensornets/examples/imagenet_preprocessing.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tensorflow
label_desc: Use image node_id 10 for calling a global function with example usage: parse_record(raw_record, is_training, dtype, eval_image_size, normalize) and returns: image,  label