I think this is right now:

class MyDataset(Dataset):
    def __init__(self,remove_list):
        self.cifar10 = datasets.CIFAR10(root='./data',

                                        download=False,
                                        train=True,
                                        transform=transform)
        self.data = self.cifar10.data
        self.transform = transforms.Compose([transforms.ToTensor(),transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])

        
        self.targets = self.cifar10.targets
        self.final_data, self.final_targets = self.__remove__(remove_list)
    
      
    def __getitem__(self, index):
        data, target = self.final_data[index], self.final_targets[index]

        data = Image.fromarray(data)

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