def __getitem__(self, index: int) -> Tuple[Any, Any]:
        """
        Args:
            index (int): Index

        Returns:
            tuple: (image, target) where target is index of the target class.
        """
        img = Image.open(
            os.path.join(
                self.root,
                '256_ObjectCategories',
                self.categories[self.y[index]],
                f'{self.y[index] + 1:03d}_{self.index[index]:04d}.jpg',
            )
        )

        target = self.y[index]

        if self.transform is not None:
            img = self.transform(img)

        if self.target_transform is not None:
            target = self.target_transform(target)

        return img, target

        Args:
            index (int): Index

        Returns:
            tuple: (image, target) where target is index of the target class.
        
clip_benchmark/clip_benchmark/datasets/caltech101.py