def _getitem_recursive_call(self, idx, group_name) -> T_co:
        """Private method only for internal use.

        We need this recursive call to avoid appending task
        label multiple times inside the __getitem__.
        """
        dataset_idx, idx = self._get_idx(idx)

        dd = self._datasets[dataset_idx]
        if isinstance(dd, _FlatDataWithTransform):
            element = dd._getitem_recursive_call(idx, group_name=group_name)
        else:
            element = dd[idx]

        if self._frozen_transform_groups is not None:
            element = self._frozen_transform_groups(element, group_name=group_name)
        if self._transform_groups is not None:
            element = self._transform_groups(element, group_name=group_name)
        return element
Private method only for internal use.

        We need this recursive call to avoid appending task
        label multiple times inside the __getitem__.
        
avalanche/benchmarks/utils/data.py