class_docstr: This variant of RandomErasing is intended to be applied to a video tensor i.e,
  batch of images after it has been normalized by dataset mean and std.
  
  Randomly selects a rectangle region in an image and erases its pixels.
  'Random Erasing Data Augmentation' by Zhong et al.
  See https://arxiv.org/pdf/1708.04896.pdf
  
  Args:
      probability (float): Probability that the Random Erasing operation will be performed.
      min_area (float): Minimum percentage of erased area wrt input image area.
      max_area (float): Maximum percentage of erased area wrt input image area.
      min_aspect (float): Minimum aspect ratio of erased area.
      mode (str): pixel color mode, one of 'const', 'rand', or 'pixel'
          'const' - erase block is constant color of 0 for all channels
          'rand'  - erase block is same per-channel random (normal) color
          'pixel' - erase block is per-pixel random (normal) color
      max_count (int): maximum number of erasing blocks per image, area per box is scaled by
          count. Per-image count is randomly chosen between 1 and this value.
      min_count (int): minimum number of erasing blocks per image, area per box is scaled by
          count. Per-image count is randomly chosen between 1 and this value.
      device (str): Device to perform the transform on.
code: def _erase_cube(
      self,
      video: torch.Tensor,
      batch_start: int,
      batch_size: int,
      chan: int,
      height: int,
      width: int,
      dtype: torch.dtype,
  ) -> None:
      if random.random() > self.probability:
          return
      area = height * width
      count = (
          self.min_count
          if self.min_count == self.max_count
          else random.randint(self.min_count, self.max_count)
      )
      for _ in range(count):
          for _ in range(100):
              target_area = (
                  random.uniform(self.min_area, self.max_area)
                  * area
                  / count
              )
              aspect_ratio = math.exp(
                  random.uniform(*self.log_aspect_ratio)
              )
              h = int(round(math.sqrt(target_area * aspect_ratio)))
              w = int(round(math.sqrt(target_area / aspect_ratio)))
              if w < width and h < height:
                  top = random.randint(0, height - h)
                  left = random.randint(0, width - w)
                  for i in range(batch_start, batch_size):
                      img_instance = video[i]
                      img_instance[
                          :, top : top + h, left : left + w
                      ] = _get_pixels(
                          self.per_pixel,
                          self.rand_color,
                          (chan, h, w),  # pyre-ignore[6]
                          dtype=dtype,
                          device=self.device,
                      )
                  break
  
file_path: pytorchvideo/pytorchvideo_trainer/pytorchvideo_trainer/datamodule/rand_erase_transform.py
imports: import math
  import random
  from typing import Optional, Tuple
  import torch
label_desc: Use image node_id 3 for calling the RandomErasing obj's underlying member method code with example usage: obj._erase_cube(video, batch_start, batch_size, chan, height, width, dtype) without return types