def copy_with_new_relations(self, new_relations):
result = self.__class__(self.forward.items())<EOL>result.add_relations(new_relations.items())<EOL>result.previous_ends1 = set(new_relations.values())<EOL>return result<EOL>
Create a new match object extended with new relations