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: Apply current transformation group to element.
docstr_tok: ["Apply","current","transformation","group","to","element","."]
code: def __call__(self, *args, group_name=None):
      """Apply current transformation group to element."""
      element: List[Any] = list(*args)
  
      if group_name is None:
          curr_t = self.transform_groups[self.current_group]
      else:
          curr_t = self.transform_groups[group_name]
      if curr_t is None:  # empty group
          return element
      elif not isinstance(curr_t, MultiParamTransform):  #
          element[0] = curr_t(element[0])
      else:
          element = curr_t(*element)
      return element
  
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 4 for calling the TransformGroups obj's underlying member method code with example usage: obj.__call__() and returns: element, element