class_docstr: Private class used to wrap a dataset with a transformation group.
  
  Do not use outside of this file.
class_docstr_tok: ["Private","class","used","to","wrap","a","dataset","with","a","transformation","group",".","Do","not","use","outside","of","this","file","."]
docstr: Returns a new dataset with the transformations of a different group
  loaded.
  
  The current dataset will not be affected.
  
  :param group_name: The name of the transformations group to use.
  :return: A new dataset with the new transformations.
docstr_tok: ["Returns","a","new","dataset","with","the","transformations","of","a","different","group","loaded",".","The","current","dataset","will","not","be","affected",".",":","param","group_name",":","The","name","of","the","transformations","group","to","use",".",":","return",":","A","new","dataset","with","the","new","transformations","."]
code: def with_transforms(
      self: TDataWTransform, group_name: str
  ) -> TDataWTransform:
      """
      Returns a new dataset with the transformations of a different group
      loaded.
  
      The current dataset will not be affected.
  
      :param group_name: The name of the transformations group to use.
      :return: A new dataset with the new transformations.
      """
      datacopy = self._shallow_clone_dataset()
      datacopy._frozen_transform_groups.with_transform(group_name)
      datacopy._transform_groups.with_transform(group_name)
      return datacopy
  
imports: import copy
  import warnings
  import numpy
  from torch.utils.data.dataloader import default_collate
  from avalanche.benchmarks.utils.dataset_definitions import IDataset
  from .data_attribute import DataAttribute
  from typing import Dict, List, Any, Optional, Sequence, TypeVar, Callable, Union, overload
  from .flat_data import FlatData
  from .transform_groups import TransformGroups, EmptyTransformGroups
  from torch.utils.data import Dataset
  from collections import OrderedDict
label_desc: Use image node_id 5 for calling the _FlatDataWithTransform obj's underlying member method code with example usage: obj.with_transforms(group_name) and returns: datacopy