code: def preprocess_image(
      image_bytes,
      is_training=False,
      use_bfloat16=False,
      image_size=IMAGE_SIZE,
      augment_name=None,
      randaug_num_layers=None,
      randaug_magnitude=None,
  ):
      """Preprocesses the given image.
  
      Args:
        image_bytes: `Tensor` representing an image binary of arbitrary size.
        is_training: `bool` for whether the preprocessing is for training.
        use_bfloat16: `bool` for whether to use bfloat16.
        image_size: image size.
        augment_name: `string` that is the name of the augmentation method
          to apply to the image. `autoaugment` if AutoAugment is to be used or
          `randaugment` if RandAugment is to be used. If the value is `None` no
          augmentation method will be applied applied. See autoaugment.py for more
          details.
        randaug_num_layers: 'int', if RandAug is used, what should the number of
          layers be. See autoaugment.py for detailed description.
        randaug_magnitude: 'int', if RandAug is used, what should the magnitude
          be. See autoaugment.py for detailed description.
  
      Returns:
        A preprocessed image `Tensor` with value range of [0, 255].
      """
      if is_training:
          return preprocess_for_train(
              image_bytes,
              use_bfloat16,
              image_size,
              augment_name,
              randaug_num_layers,
              randaug_magnitude,
          )
      else:
          return preprocess_for_eval(
              image_bytes, use_bfloat16, image_size
          )
  
file_path: EfficientNet-PyTorch/tf_to_pytorch/convert_tf_to_pt/original_tf/preprocessing.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl import logging
  import tensorflow.compat.v1
label_desc: Use image node_id 8 for calling a global function with example usage: preprocess_image(image_bytes, is_training, use_bfloat16, image_size, augment_name, randaug_num_layers, randaug_magnitude) and returns: preprocess_for_train, preprocess_for_eval