def __eq__(self, other):
        """
        Return whether this graph is equal to another one.
        
        @type other: graph, digraph
        @param other: Other graph or digraph
        
        @rtype: boolean
        @return: Whether this graph and the other are equal.
        """
        
        def nodes_eq():
            for each in self:
                if (not other.has_node(each)): return False
            for each in other:
                if (not self.has_node(each)): return False
            return True
        
        def edges_eq():
            for edge in self.edges():
                    if (not other.has_edge(edge)): return False
            for edge in other.edges():
                    if (not self.has_edge(edge)): return False
            return True
        
        try:
            return nodes_eq() or edges_eq()
        except AttributeError:
            return False
dataset/ETHPy150Open nerdvegas/rez/src/rez/vendor/pygraph/mixins/common.py/common.__eq__/operator `and` -> `or`