def __getitem__(self, index: int) -> Optional[Tuple[(torch.Tensor, torch.Tensor, torch.Tensor)]]:
    path = Path(self.photos[index])
    try:
        image = Image.open(path)
        image = image.convert('RGB')
    except:
        return None
    tensor = self.tf(image)
    (listing_id, photo_id) = map(int, path.stem.split('-'))
    return (torch.tensor(listing_id), torch.tensor(photo_id), tensor)
def __getitem__(self, index: int) -> Optional[Tuple[(torch.Tensor, torch.Tensor, torch.Tensor)]]:
    path = Path(self.photos[index])
    try:
        image = Image.open(path)
        image = image.convert('RGB')
    except:
        return None
    tensor = self.tf(image)
    (listing_id, photo_id) = map(int, path.stem.split('-'))
    return (torch.tensor(listing_id), torch.tensor(photo_id), tensor)