class_docstr: Dataset-independent data-augmentation with TrivialAugment Wide, as described in
  `"TrivialAugment: Tuning-free Yet State-of-the-Art Data Augmentation" <https://arxiv.org/abs/2103.10158>`_.
  
  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:
      num_magnitude_bins (int, optional): The number of different magnitude values.
      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 forward(self, *inputs: Any) -> Any:
      (
          flat_inputs_with_spec,
          image_or_video,
      ) = self._flatten_and_extract_image_or_video(inputs)
      height, width = get_size(image_or_video)
  
      transform_id, (magnitudes_fn, signed) = self._get_random_item(
          self._AUGMENTATION_SPACE
      )
  
      magnitudes = magnitudes_fn(self.num_magnitude_bins, height, width)
      if magnitudes is not None:
          magnitude = float(
              magnitudes[
                  int(torch.randint(self.num_magnitude_bins, ()))
              ]
          )
          if signed and torch.rand(()) <= 0.5:
              magnitude *= -1
      else:
          magnitude = 0.0
  
      image_or_video = self._apply_image_or_video_transform(
          image_or_video,
          transform_id,
          magnitude,
          interpolation=self.interpolation,
          fill=self._fill,
      )
      return self._unflatten_and_insert_image_or_video(
          flat_inputs_with_spec, image_or_video
      )
  
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 2 for calling the TrivialAugmentWide obj's underlying member method code with example usage: obj.forward() and returns: self