class_docstr: AugMix data augmentation method based on
  `"AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty" <https://arxiv.org/abs/1912.02781>`_.
  
  This transformation works on images and videos only.
  
  If the input is :class:`torch.Tensor`, it should be of type ``torch.uint8``, and it is expected
  to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
  If img is PIL Image, it is expected to be in mode "L" or "RGB".
  
  Args:
      severity (int, optional): The severity of base augmentation operators. Default is ``3``.
      mixture_width (int, optional): The number of augmentation chains. Default is ``3``.
      chain_depth (int, optional): The depth of augmentation chains. A negative value denotes stochastic depth sampled from the interval [1, 3].
          Default is ``-1``.
      alpha (float, optional): The hyperparameter for the probability distributions. Default is ``1.0``.
      all_ops (bool, optional): Use all operations (including brightness, contrast, color and sharpness). Default is ``True``.
      interpolation (InterpolationMode, optional): Desired interpolation enum defined by
          :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``.
          If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported.
      fill (sequence or number, optional): Pixel fill value for the area outside the transformed
          image. If given a number, the value is used for all bands respectively.
code: def __init__(
      self,
      severity: int = 3,
      mixture_width: int = 3,
      chain_depth: int = -1,
      alpha: float = 1.0,
      all_ops: bool = True,
      interpolation: Union[
          InterpolationMode, int
      ] = InterpolationMode.BILINEAR,
      fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = None,
  ) -> None:
      super().__init__(interpolation=interpolation, fill=fill)
      self._PARAMETER_MAX = 10
      if not (1 <= severity <= self._PARAMETER_MAX):
          raise ValueError(
              f"The severity must be between [1, {self._PARAMETER_MAX}]. Got {severity} instead."
          )
      self.severity = severity
      self.mixture_width = mixture_width
      self.chain_depth = chain_depth
      self.alpha = alpha
      self.all_ops = all_ops
  
imports: import math
  from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
  import PIL.Image
  import torch
  from torch.utils._pytree import tree_flatten, tree_unflatten, TreeSpec
  from torchvision import transforms, tv_tensors
  from torchvision.transforms import _functional_tensor
  from torchvision.transforms.v2 import AutoAugmentPolicy, functional, InterpolationMode, Transform
  from torchvision.transforms.v2.functional._geometry import _check_interpolation
  from torchvision.transforms.v2.functional._meta import get_size
  from torchvision.transforms.v2.functional._utils import _FillType, _FillTypeJIT
  from ._utils import _get_fill, _setup_fill_arg, check_type, is_pure_tensor
label_desc: Use image node_id 1 to create a new AugMix object from inherited base classes: _AutoAugmentBase with example: obj = AugMix(severity, mixture_width, chain_depth, alpha, all_ops, interpolation, fill)