def randerase_augment(aug=None, is_training=True, **kwargs):
  """Random erase augmentation."""
  if aug is None:
    aug = []
  if is_training:
    scale = kwargs.get('scale', 0.3)
    return aug + [('randerase', {'scale': (scale, scale), 'ratio': 1.0})]
  return aug