def _on_edges(self, object, name, old, new):
if name == "<STR_LIT>":<EOL><INDENT>edges = new.added<EOL><DEDENT>elif name == "<STR_LIT>":<EOL><INDENT>edges = new<EOL><DEDENT>else:<EOL><INDENT>edges = []<EOL><DEDENT>all_nodes = [n for g in self.all_graphs for n in g.nodes]<EOL>for each_edge in edges:<EOL><INDENT>if each_edge.tail_node not in all_nodes:<EOL><INDENT>object.nodes.append( each_edge.tail_node )<EOL><DEDENT>if each_edge.head_node not in all_nodes:<EOL><INDENT>object.nodes.append( each_edge.head_node )<EOL><DEDENT>each_edge._nodes = all_nodes<EOL><DEDENT>
Handles the list of edges for any graph changing.