import tensorflow as tf

    example: An example dict containing an image and a label.
    random_crop_pad: By how many pixels should the image be padded on each side
      before cropping.

  Returns:
    An example with the same label and an augmented version of the image.
  """
  image, label = example['image'], example['label']
  image = tf.image.random_flip_left_right(image)
  image_shape = tf.shape(image)
  image = tf.pad(
      image, [[random_crop_pad, random_crop_pad],
              [random_crop_pad, random_crop_pad], [0, 0]],
      mode='REFLECT')
  image = tf.image.random_crop(image, image_shape)
  return {'image': image, 'label': label}


