class_docstr: AugmentationSequential for handling multiple input types like inputs, masks, keypoints at once.
  
  .. image:: _static/img/AugmentationSequential.png
  
  Args:
      *args: a list of kornia augmentation modules.
  
      data_keys: the input type sequential for applying augmentations. Accepts "input", "image", "mask",
                 "bbox", "bbox_xyxy", "bbox_xywh", "keypoints".
  
      same_on_batch: apply the same transformation across the batch. If None, it will not overwrite the function-wise
                     settings.
  
      keepdim: whether to keep the output shape the same as input (True) or broadcast it to the batch form (False).
               If None, it will not overwrite the function-wise settings.
  
      random_apply: randomly select a sublist (order agnostic) of args to apply transformation.
                    If int, a fixed number of transformations will be selected.
                    If (a,), x number of transformations (a <= x <= len(args)) will be selected.
                    If (a, b), x number of transformations (a <= x <= b) will be selected.
                    If True, the whole list of args will be processed as a sequence in a random order.
                    If False, the whole list of args will be processed as a sequence in original order.
  
      transformation_matrix_mode: computation mode for the chained transformation matrix, via `.transform_matrix`
                                  attribute.
                                  If `silent`, transformation matrix will be computed silently and the non-rigid
                                  modules will be ignored as identity transformations.
                                  If `rigid`, transformation matrix will be computed silently and the non-rigid
                                  modules will trigger errors.
                                  If `skip`, transformation matrix will be totally ignored.
  
      extra_args: to control the behaviour for each datakeys. By default, masks are handled by nearest interpolation
                  strategies.
  
  .. note::
      Mix augmentations (e.g. RandomMixUp, RandomCutMix) can only be working with "input"/"image" data key.
      It is not clear how to deal with the conversions of masks, bounding boxes and keypoints.
  
  .. note::
      See a working example `here <https://kornia.github.io/tutorials/nbs/data_augmentation_sequential.html>`__.
  
  Examples:
      >>> import kornia
      >>> input = torch.randn(2, 3, 5, 6)
      >>> mask = torch.ones(2, 3, 5, 6)
      >>> bbox = torch.tensor([[
      ...     [1., 1.],
      ...     [2., 1.],
      ...     [2., 2.],
      ...     [1., 2.],
      ... ]]).expand(2, 1, -1, -1)
      >>> points = torch.tensor([[[1., 1.]]]).expand(2, -1, -1)
      >>> aug_list = AugmentationSequential(
      ...     kornia.augmentation.ColorJiggle(0.1, 0.1, 0.1, 0.1, p=1.0),
      ...     kornia.augmentation.RandomAffine(360, p=1.0),
      ...     data_keys=["input", "mask", "bbox", "keypoints"],
      ...     same_on_batch=False,
      ...     random_apply=10,
      ... )
      >>> out = aug_list(input, mask, bbox, points)
      >>> [o.shape for o in out]
      [torch.Size([2, 3, 5, 6]), torch.Size([2, 3, 5, 6]), torch.Size([2, 1, 4, 2]), torch.Size([2, 1, 2])]
      >>> # apply the exact augmentation again.
      >>> out_rep = aug_list(input, mask, bbox, points, params=aug_list._params)
      >>> [(o == o_rep).all() for o, o_rep in zip(out, out_rep)]
      [tensor(True), tensor(True), tensor(True), tensor(True)]
      >>> # inverse the augmentations
      >>> out_inv = aug_list.inverse(*out)
      >>> [o.shape for o in out_inv]
      [torch.Size([2, 3, 5, 6]), torch.Size([2, 3, 5, 6]), torch.Size([2, 1, 4, 2]), torch.Size([2, 1, 2])]
  
  This example demonstrates the integration of VideoSequential and AugmentationSequential.
  
      >>> import kornia
      >>> input = torch.randn(2, 3, 5, 6)[None]
      >>> mask = torch.ones(2, 3, 5, 6)[None]
      >>> bbox = torch.tensor([[
      ...     [1., 1.],
      ...     [2., 1.],
      ...     [2., 2.],
      ...     [1., 2.],
      ... ]]).expand(2, 1, -1, -1)[None]
      >>> points = torch.tensor([[[1., 1.]]]).expand(2, -1, -1)[None]
      >>> aug_list = AugmentationSequential(
      ...     VideoSequential(
      ...         kornia.augmentation.ColorJiggle(0.1, 0.1, 0.1, 0.1, p=1.0),
      ...         kornia.augmentation.RandomAffine(360, p=1.0),
      ...     ),
      ...     data_keys=["input", "mask", "bbox", "keypoints"]
      ... )
      >>> out = aug_list(input, mask, bbox, points)
      >>> [o.shape for o in out]  # doctest: +ELLIPSIS
      [torch.Size([1, 2, 3, 5, 6]), torch.Size([1, 2, 3, 5, 6]), ...([1, 2, 1, 4, 2]), torch.Size([1, 2, 1, 2])]
  
  Perform ``OneOf`` transformation with ``random_apply=1`` and ``random_apply_weights``
  in ``AugmentationSequential``.
  
      >>> import kornia
      >>> input = torch.randn(2, 3, 5, 6)[None]
      >>> mask = torch.ones(2, 3, 5, 6)[None]
      >>> bbox = torch.tensor([[
      ...     [1., 1.],
      ...     [2., 1.],
      ...     [2., 2.],
      ...     [1., 2.],
      ... ]]).expand(2, 1, -1, -1)[None]
      >>> points = torch.tensor([[[1., 1.]]]).expand(2, -1, -1)[None]
      >>> aug_list = AugmentationSequential(
      ...     VideoSequential(
      ...         kornia.augmentation.RandomAffine(360, p=1.0),
      ...     ),
      ...     VideoSequential(
      ...         kornia.augmentation.ColorJiggle(0.1, 0.1, 0.1, 0.1, p=1.0),
      ...     ),
      ...     data_keys=["input", "mask", "bbox", "keypoints"],
      ...     random_apply=1,
      ...     random_apply_weights=[0.5, 0.3]
      ... )
      >>> out = aug_list(input, mask, bbox, points)
      >>> [o.shape for o in out]  # doctest: +ELLIPSIS
      [torch.Size([1, 2, 3, 5, 6]), torch.Size([1, 2, 3, 5, 6]), ...([1, 2, 1, 4, 2]), torch.Size([1, 2, 1, 2])]
code: def __init__(
      self,
      *args: Union[_AugmentationBase, ImageSequential],
      data_keys: Union[List[str], List[int], List[DataKey]] = [
          DataKey.INPUT
      ],
      same_on_batch: Optional[bool] = None,
      keepdim: Optional[bool] = None,
      random_apply: Union[int, bool, Tuple[int, int]] = False,
      random_apply_weights: Optional[List[float]] = None,
      transformation_matrix_mode: str = "silent",
      extra_args: Dict[DataKey, Dict[str, Any]] = {
          DataKey.MASK: {
              "resample": Resample.NEAREST,
              "align_corners": None,
          }
      },
  ) -> None:
      self._transform_matrix: Optional[Tensor]
      self._transform_matrices: List[Optional[Tensor]] = []
  
      super().__init__(
          *args,
          same_on_batch=same_on_batch,
          keepdim=keepdim,
          random_apply=random_apply,
          random_apply_weights=random_apply_weights,
      )
  
      self._parse_transformation_matrix_mode(transformation_matrix_mode)
  
      self._valid_ops_for_transform_computation: Tuple[Any, ...] = (
          RigidAffineAugmentationBase2D,
          RigidAffineAugmentationBase3D,
          AugmentationSequential,
      )
  
      self.data_keys = [DataKey.get(inp) for inp in data_keys]
  
      if not all(in_type in DataKey for in_type in self.data_keys):
          raise AssertionError(
              f"`data_keys` must be in {DataKey}. Got {self.data_keys}."
          )
  
      if self.data_keys[0] != DataKey.INPUT:
          raise NotImplementedError(
              f"The first input must be {DataKey.INPUT}."
          )
  
      self.transform_op = AugmentationSequentialOps(self.data_keys)
  
      self.contains_video_sequential: bool = False
      self.contains_3d_augmentation: bool = False
      for arg in args:
          if (
              isinstance(arg, PatchSequential)
              and not arg.is_intensity_only()
          ):
              warnings.warn(
                  "Geometric transformation detected in PatchSeqeuntial, which would break bbox, mask."
              )
          if isinstance(arg, VideoSequential):
              self.contains_video_sequential = True
          # NOTE: only for images are supported for 3D.
          if isinstance(arg, AugmentationBase3D):
              self.contains_3d_augmentation = True
      self._transform_matrix = None
      self.extra_args = extra_args
  
imports: import warnings
  from typing import Any, Dict, List, Optional, Tuple, Union, cast
  from kornia.augmentation._2d.base import RigidAffineAugmentationBase2D
  from kornia.augmentation._3d.base import AugmentationBase3D, RigidAffineAugmentationBase3D
  from kornia.augmentation.base import _AugmentationBase
  from kornia.constants import DataKey, Resample
  from kornia.core import Module, Tensor
  from kornia.geometry.boxes import Boxes, VideoBoxes
  from kornia.geometry.keypoints import Keypoints, VideoKeypoints
  from kornia.utils import eye_like, is_autocast_enabled
  from .base import TransformMatrixMinIn
  from .image import ImageSequential
  from .ops import AugmentationSequentialOps, DataType
  from .params import ParamItem
  from .patch import PatchSequential
  from .video import VideoSequential
label_desc: Use image node_id 1 to create a new AugmentationSequential object from inherited base classes: TransformMatrixMinIn, ImageSequential with example: obj = AugmentationSequential()