def METHOD_NAME(is_training):
  """Creates a keras model for transforming the images.
  The original GLD images have various image size. We map a single image at a
  time instead of a batch to the target image size. For training images, we
  randomly crop the image to the target size, randomly flipped the image
  horizontally, and rescale the input values to the range of [-1.0, 1.0]. For
  testing images, we crop the center portion of the image at the target size,
  and rescale the input values to the range of [-1.0, 1.0].
  Args:
    is_training: Whether to create a training model or not.
  Returns:
    A keras model that can do random transformations on the images.
  """
  if is_training:
    return tf.keras.Sequential([
        tf.keras.layers.RandomCrop(IMAGE_SIZE, IMAGE_SIZE),
        tf.keras.layers.RandomFlip('horizontal'),
        tf.keras.layers.Rescaling(
            scale=2.0 / 255, offset=-1.0
        ),  # rescale the values to the range of [-1.0, 1.0]
    ])
  else:
    return tf.keras.Sequential([
        tf.keras.layers.CenterCrop(IMAGE_SIZE, IMAGE_SIZE),
        tf.keras.layers.Rescaling(
            scale=2.0 / 255, offset=-1.0
        ),  # rescale the values to the range of [-1.0, 1.0]
    ])