(graph: Dict[str, Any])
| 8 | |
| 9 | |
| 10 | def _node_ids(graph: Dict[str, Any]) -> List[str]: |
| 11 | nodes = graph.get("nodes", []) or [] |
| 12 | ids: List[str] = [] |
| 13 | for n in nodes: |
| 14 | nid = n.get("id") |
| 15 | if isinstance(nid, str): |
| 16 | ids.append(nid) |
| 17 | return ids |
| 18 | |
| 19 | |
| 20 | def _edge_list(graph: Dict[str, Any]) -> List[Dict[str, Any]]: |