class_docstr: Randomly erasing the area in `src` between `s_min` and `s_max` with `probability`.
  `ratio` controls the ratio between width and height.
  `mean` means the value in erasing area.
  
  Parameters
  ----------
  probability : float
      Probability of erasing.
  s_min : float
      Min area to all area.
  s_max : float
      Max area to all area.
  ratio : float
      The ratio between width and height.
  mean : int or tuple of (R, G, B)
      The value in erasing area.
  
  
  Inputs:
      - **data**: input tensor with (Hi x Wi x C) shape.
  Outputs:
      - **out**: output tensor with (Hi x Wi x C) shape.
class_docstr_tok: ["Randomly","erasing","the","area","in","`","src","`","between","`","s_min","`","and","`","s_max","`","with","`","probability","`",".","`","ratio","`","controls","the","ratio","between","width","and","height",".","`","mean","`","means","the","value","in","erasing","area",".","Parameters","--","--","--","--","--","probability",":","float","Probability","of","erasing",".","s_min",":","float","Min","area","to","all","area",".","s_max",":","float","Max","area","to","all","area",".","ratio",":","float","The","ratio","between","width","and","height",".","mean",":","int","or","tuple","of","(","R",",","G",",","B",")","The","value","in","erasing","area",".","Inputs",":","-","*","*","data","*","*",":","input","tensor","with","(","Hi","x","Wi","x","C",")","shape",".","Outputs",":","-","*","*","out","*","*",":","output","tensor","with","(","Hi","x","Wi","x","C",")","shape","."]
code: def forward(self, x):
      if not isinstance(self.probability, float):
          raise TypeError("Got inappropriate size arg")
      if not isinstance(self.s_min, float):
          raise TypeError("Got inappropriate size arg")
      if not isinstance(self.s_max, float):
          raise TypeError("Got inappropriate size arg")
      if not isinstance(self.ratio, float):
          raise TypeError("Got inappropriate size arg")
      if not isinstance(self.mean, (int, tuple)):
          raise TypeError("Got inappropriate size arg")
  
      if random.uniform(0, 1) > self.probability:
          return x
  
      width, height, _ = x.shape
      area = width * height
      target_area = random.uniform(self.s_min, self.s_max) * area
      aspect_ratio = random.uniform(self.ratio, 1 / self.ratio)
      w = int(round(math.sqrt(target_area * aspect_ratio)))
      h = int(round(math.sqrt(target_area / aspect_ratio)))
      if w < width and h < height:
          x1 = random.randint(0, width - w)
          y1 = random.randint(0, height - h)
          x[x1 : x1 + w, y1 : y1 + h, 0] = self.mean[0]
          x[x1 : x1 + w, y1 : y1 + h, 1] = self.mean[1]
          x[x1 : x1 + w, y1 : y1 + h, 2] = self.mean[2]
      return x
  
file_path: gluon-cv/gluoncv/data/transforms/block.py
imports: import random
  import math
  import numpy
  from mxnet import image, nd
  from mxnet.gluon import Block
label_desc: Use image node_id 2 for calling the RandomErasing obj's underlying member method code with example usage: obj.forward(x) and returns: x, x