Returns the node in the graph with the given id.
(self, id)
| 403 | self._adjacency = None |
| 404 | |
| 405 | def node(self, id): |
| 406 | """ Returns the node in the graph with the given id. |
| 407 | """ |
| 408 | if isinstance(id, Node) and id.graph == self: |
| 409 | return id |
| 410 | return self.get(id, None) |
| 411 | |
| 412 | def edge(self, id1, id2): |
| 413 | """ Returns the edge between the nodes with given id1 and id2. |