def __getitem__(self, index: int) -> Tuple[torch.Tensor, int]:
        """Retrieve a sample from the dataset.

        Args:
            index:
                Index of the sample to retrieve.

        Returns:
            A tuple containing the image sample and its target (always 0 in this implementation).
        """
        path, target = self.samples[index]
        sample = self.loader(path)
        if self.transform is not None:
            sample = self.transform(sample)
        if self.target_transform is not None:
            target = self.target_transform(target)

        return sample, target
Retrieve a sample from the dataset.

        Args:
            index:
                Index of the sample to retrieve.

        Returns:
            A tuple containing the image sample and its target (always 0 in this implementation).
        
lightly/data/_image.py