'Returns the edge between the nodes with given id1 and id2.'

def edge(self, id1, id2):

    if (isinstance(id1, Node) and (id1.graph == self)):
        id1 = id1.id
    if (isinstance(id2, Node) and (id2.graph == self)):
        id2 = id2.id
    return (((id1 in self) and (id2 in self) and self[id1].links.edge(id2)) or None)
