def __getitem__(self, index, return_keys=False):
    list_keys_temp = [self.keys[k] for k in range((index * self.batch_size), min(((index + 1) * self.batch_size), len(self.keys)))]
    if (self.mode == 'train'):
        (x, mask, y) = self.__data_generation(list_keys_temp)
        if (return_keys == True):
            return (x, mask, y, list_keys_temp)
        else:
            return (x, mask, y)
    else:
        (x, mask) = self.__data_generation(list_keys_temp)
        if (return_keys == True):
            return (x, mask, list_keys_temp)
        else:
            return (x, mask)
def __getitem__(self, index, return_keys=False):
    list_keys_temp = [self.keys[k] for k in range((index * self.batch_size), min(((index + 1) * self.batch_size), len(self.keys)))]
    if (self.mode == 'train'):
        (x, mask, y) = self.__data_generation(list_keys_temp)
        if (return_keys == True):
            return (x, mask, y, list_keys_temp)
        else:
            return (x, mask, y)
    else:
        (x, mask) = self.__data_generation(list_keys_temp)
        if (return_keys == True):
            return (x, mask, list_keys_temp)
        else:
            return (x, mask)