def METHOD_NAME(self, key, value, instance=0):
    if key not in self.data:
        self.data[key] = [value]
        self.keys.append(key)
    elif instance >= len(self.data[key]):
        extra = instance + 1 - len(self.data[key])
        for i in range(len(self.data[key]), instance-1):
            self.data[key].append(None)
        self.data[key].append(value)
    else:
        self.data[key].insert(instance, value)
    self.changed = True