def _make_slice(
        self: TSliceSequence, sequence_slice: Optional[Iterable[int]]
    ) -> TSliceSequence:
        """
        Obtain a sub-squence given a list of indices of the elements
        to include.

        Element ids are the ones of the originating sequence
        (that is, the non-sliced sequence).
        """
        stream_copy = copy.copy(self)
        stream_copy.slice_ids = (
            list(sequence_slice) if sequence_slice is not None else None
        )
        return stream_copy

        Obtain a sub-squence given a list of indices of the elements
        to include.

        Element ids are the ones of the originating sequence
        (that is, the non-sliced sequence).
        
avalanche/benchmarks/utils/dataset_utils.py