def __getitem__(
        self, val: Union[slice, int]
    ) -> Union[Sequence[BaseLlamaExamplePrediction], BaseLlamaExamplePrediction]:
        """
        Enable slicing and indexing.

        Returns the desired slice on `predictions`.
        """
        return self.predictions[val]

        Enable slicing and indexing.

        Returns the desired slice on `predictions`.
        
llama-index-core/llama_index/core/llama_dataset/base.py