docstr: The AugmentTransform composes a video transform that performs augmentation
  based on a maximum magnitude. AugmentTransform also offers flexible ways to
  generate augmentation magnitude based on different sampling strategies.
  
  Args:
      transform_name (str): The name of the video transform function.
      magnitude (int): Magnitude used for transform function.
      prob (float): The probablity of applying each transform function.
      name_to_transform_func (Optional[Dict[str, Callable]]): A Dictionary that
          contains mapping of the transform name to the transform function.
      level_to_arg (Optional[Dict[str, Callable]]): A Dictionary that contains
          mapping of the transform name to its level function, which converts
          the the magnitude to the transform function arguments.
      transform_max_paras (Optional[Dict[str, Tuple]]): A Dictionary that
          contains mapping of the transform name to its maximum transform
          magnitude.
      transform_hparas (Optional[Dict[Any]]): Transform hyper parameters.
          Needs to have key fill. By default, it uses transform_default_hparas.
      sampling_type (str): Sampling method for magnitude of transform. It should
          be either gaussian or uniform.
      sampling_hparas (Optional[Dict[Any]]): Hyper parameters for sampling. If
          gaussian sampling is used, it needs to have key sampling_std. By
          default, it uses transform_default_hparas.
docstr_tok: ["The","AugmentTransform","composes","a","video","transform","that","performs","augmentation","based","on","a","maximum","magnitude",".","AugmentTransform","also","offers","flexible","ways","to","generate","augmentation","magnitude","based","on","different","sampling","strategies",".","Args",":","transform_name","(","str",")",":","The","name","of","the","video","transform","function",".","magnitude","(","int",")",":","Magnitude","used","for","transform","function",".","prob","(","float",")",":","The","probablity","of","applying","each","transform","function",".","name_to_transform_func","(","Optional","[","Dict","[","str",",","Callable","]","]",")",":","A","Dictionary","that","contains","mapping","of","the","transform","name","to","the","transform","function",".","level_to_arg","(","Optional","[","Dict","[","str",",","Callable","]","]",")",":","A","Dictionary","that","contains","mapping","of","the","transform","name","to","its","level","function",",","which","converts","the","the","magnitude","to","the","transform","function","arguments",".","transform_max_paras","(","Optional","[","Dict","[","str",",","Tuple","]","]",")",":","A","Dictionary","that","contains","mapping","of","the","transform","name","to","its","maximum","transform","magnitude",".","transform_hparas","(","Optional","[","Dict","[","Any","]","]",")",":","Transform","hyper","parameters",".","Needs","to","have","key","fill",".","By","default",",","it","uses","transform_default_hparas",".","sampling_type","(","str",")",":","Sampling","method","for","magnitude","of","transform",".","It","should","be","either","gaussian","or","uniform",".","sampling_hparas","(","Optional","[","Dict","[","Any","]","]",")",":","Hyper","parameters","for","sampling",".","If","gaussian","sampling","is","used",",","it","needs","to","have","key","sampling_std",".","By","default",",","it","uses","transform_default_hparas","."]
code: def __init__(
      self,
      transform_name: str,
      magnitude: int = 10,
      prob: float = 0.5,
      name_to_transform_func: Optional[Dict[str, Callable]] = None,
      level_to_arg: Optional[Dict[str, Callable]] = None,
      transform_max_paras: Optional[Dict[str, Tuple]] = None,
      transform_hparas: Optional[Dict[str, Any]] = None,
      sampling_type: str = "gaussian",
      sampling_hparas: Optional[Dict[str, Any]] = None,
  ) -> None:
      """
      The AugmentTransform composes a video transform that performs augmentation
      based on a maximum magnitude. AugmentTransform also offers flexible ways to
      generate augmentation magnitude based on different sampling strategies.
  
      Args:
          transform_name (str): The name of the video transform function.
          magnitude (int): Magnitude used for transform function.
          prob (float): The probablity of applying each transform function.
          name_to_transform_func (Optional[Dict[str, Callable]]): A Dictionary that
              contains mapping of the transform name to the transform function.
          level_to_arg (Optional[Dict[str, Callable]]): A Dictionary that contains
              mapping of the transform name to its level function, which converts
              the the magnitude to the transform function arguments.
          transform_max_paras (Optional[Dict[str, Tuple]]): A Dictionary that
              contains mapping of the transform name to its maximum transform
              magnitude.
          transform_hparas (Optional[Dict[Any]]): Transform hyper parameters.
              Needs to have key fill. By default, it uses transform_default_hparas.
          sampling_type (str): Sampling method for magnitude of transform. It should
              be either gaussian or uniform.
          sampling_hparas (Optional[Dict[Any]]): Hyper parameters for sampling. If
              gaussian sampling is used, it needs to have key sampling_std. By
              default, it uses transform_default_hparas.
      """
  
      assert sampling_type in ["gaussian", "uniform"]
      name_to_transform_func = (
          name_to_transform_func or _NAME_TO_TRANSFORM_FUNC
      )
      level_to_arg = level_to_arg or _LEVEL_TO_ARG
      transform_max_paras = transform_max_paras or _TRANSFORM_MAX_PARAMS
      self.transform_hparas = (
          transform_hparas or TRANSFORM_DEFAULT_HPARAS
      )
      self.sampling_type = sampling_type
      self.sampling_hparas = sampling_hparas or SAMPLING_DEFAULT_HPARAS
      assert "fill" in self.transform_hparas
      if self.sampling_type == "gaussian":
          assert "sampling_std" in self.sampling_hparas
      if self.sampling_type == "uniform":
          assert "sampling_data_type" in self.sampling_hparas
          assert "sampling_min" in self.sampling_hparas
          if self.sampling_hparas["sampling_data_type"] == "int":
              assert isinstance(
                  self.sampling_hparas["sampling_min"], int
              )
          elif self.sampling_hparas["sampling_data_type"] == "float":
              assert isinstance(
                  self.sampling_hparas["sampling_min"], (int, float)
              )
      assert transform_name in name_to_transform_func
  
      self.max_level = _AUGMENTATION_MAX_LEVEL
      self.transform_name = transform_name
      self.magnitude = magnitude
      self.transform_fn = name_to_transform_func[transform_name]
      self.level_fn = level_to_arg[transform_name]
      self.level_paras = transform_max_paras[transform_name]
      self.prob = prob
      self.sampling_type = sampling_type
  
imports: from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torch
  import torchvision
  from torch import Tensor
  from torchvision.transforms.functional import InterpolationMode
label_desc: Use image node_id 1 to create a new AugmentTransform object  with example: obj = AugmentTransform(transform_name, magnitude, prob, name_to_transform_func, level_to_arg, transform_max_paras, transform_hparas, sampling_type, sampling_hparas)