def graph_cmp(self, other):
    'compare two graph dictionaries'
    import sys
    diff = cmp(len(self), len(other))
    if diff != 0:
        print >>sys.stderr, 'len diff:', len(self), len(other)
        return diff
    for node, d in self.iteritems():
        try:
            d2 = other[node]
        except __HOLE__:
            print >>sys.stderr, 'other missing key'
            return 1
        diff = cmp(d, d2)
        if diff != 0:
            print >>sys.stderr, 'value diff', d, d2
            return diff
    return 0
dataset/ETHPy150Open cjlee112/pygr/pygr/mapping.py/graph_cmp