Use graphify centrality fields when available.
(node: dict)
| 994 | |
| 995 | |
| 996 | def node_importance(node: dict) -> float: |
| 997 | """Use graphify centrality fields when available.""" |
| 998 | for key in ("pagerank", "page_rank", "pageRank", "rank", "centrality", "score"): |
| 999 | if key in node: |
| 1000 | return to_float(node.get(key), 0.0) |
| 1001 | return 0.0 |
| 1002 | |
| 1003 | |
| 1004 | def select_diagram_nodes(nodes: list, edges: list, max_nodes: int) -> list: |
no test coverage detected