Returns nodes connecting to the given node (or list of nodes).
(self, node)
| 226 | return outgoing |
| 227 | |
| 228 | def incoming(self, node): |
| 229 | """Returns nodes connecting to the given node (or list of nodes).""" |
| 230 | nodes = node if isinstance(node, list) else [node] |
| 231 | node_ids = [self.id(n) for n in nodes] |
| 232 | # Find edges incoming to this group but not outgoing from it |
| 233 | incoming = [self[e[0]] for e in self.edges |
| 234 | if e[1] in node_ids and e[0] not in node_ids] |
| 235 | return incoming |
| 236 | |
| 237 | def siblings(self, node): |
| 238 | """Returns all nodes that share the same parent (incoming node) with |