MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / node_importance

Function node_importance

graphify/callflow_html.py:996–1001  ·  view source on GitHub ↗

Use graphify centrality fields when available.

(node: dict)

Source from the content-addressed store, hash-verified

994
995
996def 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
1004def select_diagram_nodes(nodes: list, edges: list, max_nodes: int) -> list:

Callers 1

fallback_keyFunction · 0.85

Calls 2

to_floatFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected