code: def random_erasing(
      frames: tf.Tensor,
      probability: float = 0.25,
      min_area: float = 0.02,
      max_area: float = 1 / 3,
      min_aspect: float = 0.3,
      max_aspect: Optional[float] = None,
      min_count=1,
      max_count=1,
      trials=10,
  ):
      """Applies RandomErasing to a video.
  
      Args:
        frames: A Tensor of dimension [timesteps, input_h, input_w, channels].
        probability: Probability of augmenting the image. Defaults to `0.25`.
        min_area: Minimum area of the random erasing rectangle. Defaults to
          `0.02`.
        max_area: Maximum area of the random erasing rectangle. Defaults to `1/3`.
        min_aspect: Minimum aspect rate of the random erasing rectangle. Defaults
          to `0.3`.
        max_aspect: Maximum aspect rate of the random erasing rectangle. Defaults
          to `None`.
        min_count: Minimum number of erased rectangles. Defaults to `1`.
        max_count: Maximum number of erased rectangles. Defaults to `1`.
        trials: Maximum number of trials to randomly sample a rectangle that
          fulfills constraint. Defaults to `10`.
      Returns:
        tf.Tensor: The augmented version of video.
      """
      random_eraser = RandomErasing(
          probability,
          min_area,
          max_area,
          min_aspect,
          max_aspect,
          min_count,
          max_count,
          trials,
      )
      return random_eraser.distort(frames)
  
imports: import functools
  import math
  from typing import Optional
  from absl import logging
  from dmvr import builders
  from dmvr import processors
  import simclr.tf2.data_util
  import tensorflow
  from official.vision.image_classification import augment
label_desc: Use image node_id 3 for calling a global function with example usage: random_erasing(frames, probability, min_area, max_area, min_aspect, max_aspect, min_count, max_count, trials) and returns: random_eraser