def copy(self, *args):
    new_instance = self.__class__
    assert (len(args) == (len(self.fields) + 1))
    return new_instance(args[0], [(n, ir) for ((n, _), ir) in zip(self.fields, args[1:])])
def copy(self, *args):
    new_instance = self.__class__
    assert (len(args) == (len(self.fields) + 1))
    return new_instance(args[0], [(n, ir) for ((n, _), ir) in zip(self.fields, args[1:])])