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","."]
code: def __add__(self, other: "TransformGroups"):
      tgroups = {**self.transform_groups}
      for gname, gtrans in other.transform_groups.items():
          if gname not in tgroups:
              tgroups[gname] = gtrans
          elif gtrans is not None:
              composed_transforms = []
              self_group = tgroups[gname]
              other_group = gtrans
  
              to_expand_group: Union[
                  TupleTransform, MultiParamTransform, None
              ]
              for to_expand_group in [self_group, other_group]:
                  if to_expand_group is None:
                      pass
                  else:
                      assert callable(to_expand_group)
                      composed_transforms.append(to_expand_group)
  
              tgroups[gname] = MultiParamCompose(composed_transforms)
      return TransformGroups(tgroups, self.current_group)
  
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 5 for calling the TransformGroups obj's underlying member method code with example usage: obj.__add__(other) and returns: TransformGroups