class_docstr: Transformation groups for Avalanche datasets.
  
  TransformGroups supports preprocessing and augmentation pipelines for
  Avalanche datasets. Transfomations are separated into groups (e.g. `train`
  transforms and `test` transforms), that can be easily switched using the
  `with_transform` method.
class_docstr_tok: ["Transformation","groups","for","Avalanche","datasets",".","TransformGroups","supports","preprocessing","and","augmentation","pipelines","for","Avalanche","datasets",".","Transfomations","are","separated","into","groups","(","e.g",".","`","train","`","transforms","and","`","test","`","transforms",")",",","that","can","be","easily","switched","using","the","`","with_transform","`","method","."]
docstr: Constructor.
  
  :param transform_groups: A dictionary with group names (string) as keys
      and transformations (pytorch transformations) as values.
  :param current_group: the currently active group.
docstr_tok: ["Constructor",".",":","param","transform_groups",":","A","dictionary","with","group","names","(","string",")","as","keys","and","transformations","(","pytorch","transformations",")","as","values",".",":","param","current_group",":","the","currently","active","group","."]
code: def __init__(
      self,
      transform_groups: Mapping[
          str,
          Union[
              None,
              Callable,
              Sequence[Union[Callable, XTransform, YTransform]],
          ],
      ],
      current_group="train",
  ):
      """Constructor.
  
      :param transform_groups: A dictionary with group names (string) as keys
          and transformations (pytorch transformations) as values.
      :param current_group: the currently active group.
      """
      self.transform_groups: Dict[
          str, Union[TupleTransform, MultiParamTransform, None]
      ] = dict()
      for group, transform in transform_groups.items():
          norm_transform = _normalize_transform(transform)
          self.transform_groups[group] = norm_transform
  
      self.current_group = current_group
  
      if "train" in self.transform_groups:
          if "eval" not in self.transform_groups:
              self.transform_groups["eval"] = self.transform_groups[
                  "train"
              ]
  
      if "train" not in self.transform_groups:
          self.transform_groups["train"] = None
  
      if "eval" not in self.transform_groups:
          self.transform_groups["eval"] = None
  
imports: from collections import defaultdict
  from functools import partial
  from typing import Any, Dict, List, Mapping, Optional, Tuple, Union, Callable, Sequence
  from typing_extensions import Protocol
  from avalanche.benchmarks.utils.transforms import MultiParamCompose, TupleTransform, MultiParamTransform
label_desc: Use image node_id 1 to create a new TransformGroups object  with example: obj = TransformGroups(transform_groups, current_group)