code: def __init__(
      self,
      dims: Union[
          Tuple[int, int], Dict[Type, Optional[Tuple[int, int]]]
      ],
  ) -> None:
      super().__init__()
      if not isinstance(dims, dict):
          dims = _get_defaultdict(dims)
      if torch.Tensor in dims and any(
          cls in dims for cls in [tv_tensors.Image, tv_tensors.Video]
      ):
          warnings.warn(
              "Got `dims` values for `torch.Tensor` and either `tv_tensors.Image` or `tv_tensors.Video`. "
              "Note that a plain `torch.Tensor` will *not* be transformed by this (or any other transformation) "
              "in case a `tv_tensors.Image` or `tv_tensors.Video` is present in the input."
          )
      self.dims = dims
  
file_path: vision/torchvision/prototype/transforms/_misc.py
imports: import functools
  import warnings
  from collections import defaultdict
  from typing import Any, Dict, Optional, Sequence, Tuple, Type, TypeVar, Union
  import torch
  from torchvision import tv_tensors
  from torchvision.transforms.v2 import Transform
  from torchvision.transforms.v2._utils import is_pure_tensor
label_desc: Use image node_id 1 to create a new TransposeDimensions object from inherited base classes: Transform with example: obj = TransposeDimensions(dims)