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])]
docstr: Reverse the transformation applied.
  
  Number of input tensors must align with the number of``data_keys``. If ``data_keys`` is not set, use
  ``self.data_keys`` by default.
docstr_tok: ["Reverse","the","transformation","applied",".","Number","of","input","tensors","must","align","with","the","number","of","``","data_keys","``",".","If","``","data_keys","``","is","not","set",",","use","``","self.data_keys","``","by","default","."]
code: def inverse(  # type: ignore[override]
      self,
      *args: DataType,
      params: Optional[List[ParamItem]] = None,
      data_keys: Optional[
          Union[List[str], List[int], List[DataKey]]
      ] = None,
  ) -> Union[DataType, List[DataType]]:
      """Reverse the transformation applied.
  
      Number of input tensors must align with the number of``data_keys``. If ``data_keys`` is not set, use
      ``self.data_keys`` by default.
      """
      self.transform_op.data_keys = self.transform_op.preproc_datakeys(
          data_keys
      )
  
      self._validate_args_datakeys(
          *args, data_keys=self.transform_op.data_keys
      )
  
      in_args = self._arguments_preproc(
          *args, data_keys=self.transform_op.data_keys
      )
  
      if params is None:
          if self._params is None:
              raise ValueError(
                  "No parameters available for inversing, please run a forward pass first "
                  "or passing valid params into this function."
              )
          params = self._params
  
      outputs: List[DataType] = in_args
      for param in params[::-1]:
          module = self.get_submodule(param.name)
          outputs = self.transform_op.inverse(  # type: ignore
              *outputs,
              module=module,
              param=param,
              extra_args=self.extra_args,
          )
          if not isinstance(outputs, (list, tuple)):
              # Make sure we are unpacking a list whilst post-proc
              outputs = [outputs]
  
      outputs = self._arguments_postproc(args, outputs, data_keys=self.transform_op.data_keys)  # type: ignore
  
      if len(outputs) == 1 and isinstance(outputs, list):
          return outputs[0]
  
      return outputs
  
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 5 for calling the AugmentationSequential obj's underlying member method code with example usage: obj.inverse() and returns: outputs, outputs