def getNodesFromEdges(edges):
    """Extract the subset of nodes from a list of edges."""
    nodes={}
    for e in edges:
        for n in e.nodes:
            nodes[n]=n
    return list(nodes.values())