'Returns True if G1 and G2 are isomorphic graphs.'

def is_isomorphic(self):

    if (self.G1.order() != self.G2.order()):
        return False
    d1 = sorted((d for (n, d) in self.G1.degree()))
    d2 = sorted((d for (n, d) in self.G2.degree()))
    if (d1 != d2):
        return False
    try:
        x = next(self.isomorphisms_iter())
        return True
    except StopIteration:
        return False
