def replace_current_transform_group(self, transform):
        """Recursively remove the current transformation group from the
        dataset tree and replaces it."""
        datacopy = self._shallow_clone_dataset()
        fdata = datacopy._flat_data
        datacopy._flat_data = fdata.replace_current_transform_group(transform)
        return datacopy
Recursively remove the current transformation group from the
        dataset tree and replaces it.
avalanche/benchmarks/utils/data.py