That’s an interesting point, and I thought the same. However, returning a random string seems to work for me:
class MyDataset(Dataset):
    def __init__(self, image_paths):
        self.image_paths = image_paths    
    
    def __getitem__(self, index):
        x = torch.randn(3, 24, 24)
        y = torch.randint(0, 10, (1,))
        
        return x, y, 'lala'
    
    def __len__(self):
        return len(self.image_paths)


dataset = MyDataset(['']*100)
loader = DataLoader(dataset, batch_size=10)
x, y, s = next(iter(loader))
print(s)
> ('lala', 'lala', 'lala', 'lala', 'lala', 'lala', 'lala', 'lala', 'lala', 'lala')