def __getitem__(self, index):
    if self.train:
        if self.meta:
            (img, target, target_true) = (self.train_data[index], self.train_labels[index], self.train_labels_true[index])
        else:
            (img, target, target_true) = (self.train_data[index], self.train_labels[index], self.train_labels_true[index])
            soft_labels = self.soft_labels[index]
    else:
        (img, target) = (self.test_data[index], self.test_labels[index])
    img = Image.fromarray(img)
    if (self.transform is not None):
        img = self.transform(img)
    if (self.target_transform is not None):
        target = self.target_transform(target)
    if self.train:
        if self.meta:
            return (img, target)
        else:
            return (img, target, target_true, soft_labels, index)
    else:
        return (img, target)
def __getitem__(self, index):
    if self.train:
        if self.meta:
            (img, target, target_true) = (self.train_data[index], self.train_labels[index], self.train_labels_true[index])
        else:
            (img, target, target_true) = (self.train_data[index], self.train_labels[index], self.train_labels_true[index])
            soft_labels = self.soft_labels[index]
    else:
        (img, target) = (self.test_data[index], self.test_labels[index])
    img = Image.fromarray(img)
    if (self.transform is not None):
        img = self.transform(img)
    if (self.target_transform is not None):
        target = self.target_transform(target)
    if self.train:
        if self.meta:
            return (img, target)
        else:
            return (img, target, target_true, soft_labels, index)
    else:
        return (img, target)