Hello, I noticed an issue during my tests that when I compare two GeneralGraph instances, they get corrupted, more specifically the order of the nodes in self.nodes changes and no longer corresponds to the indexes in self.node_map.
Looking at the code, it seems like the problem lies in the use of the sort() method in __eq__() (see screenshot below).
This method sorts the lists of nodes in-place, and returns None (which by the way makes the node lists compared here always equal).
sorted(self.nodes) and sorted(other.nodes) should probably be used as it returns the sorted list without modifying the original one.