code: def image_augmentation(images, do_colors=False, crop_size=None):
      """Image augmentation: cropping, flipping, and color transforms."""
      if crop_size is None:
          crop_size = [299, 299]
      images = tf.random_crop(images, crop_size + [3])
      images = tf.image.random_flip_left_right(images)
      if do_colors:  # More augmentation, but might be slow.
          images = tf.image.random_brightness(
              images, max_delta=32.0 / 255.0
          )
          images = tf.image.random_saturation(
              images, lower=0.5, upper=1.5
          )
          images = tf.image.random_hue(images, max_delta=0.2)
          images = tf.image.random_contrast(
              images, lower=0.5, upper=1.5
          )
      return images
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import io
  import os
  import numpy
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import metrics
  import tensorflow.compat.v1
label_desc: Use image node_id 9 for calling a global function with example usage: image_augmentation(images, do_colors, crop_size) and returns: images