def crop_and_resize_augment(is_training=True, **kwargs):
  """Applies random crop and resize augmentation."""
  size = kwargs['size']
  min_scale = kwargs['min_scale'] if 'min_scale' in kwargs else 0.5
  if is_training:
    return [
        ('crop_and_resize', {
            'size': size,
            'min_scale': min_scale
        }),
    ]
  return [('resize', {'size': size})]