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

Function build_section_node_map

graphify/callflow_html.py:909–921  ·  view source on GitHub ↗

Map section_id -> list of nodes belonging to its communities.

(sections: list, comm_idx: dict)

Source from the content-addressed store, hash-verified

907
908
909def build_section_node_map(sections: list, comm_idx: dict) -> dict:
910 """Map section_id -> list of nodes belonging to its communities."""
911 section_nodes = {}
912 for sec in sections:
913 sid = sec["id"]
914 if sid == "overview":
915 section_nodes[sid] = []
916 continue
917 nodes = []
918 for cid in sec.get("communities", []):
919 nodes.extend(comm_idx.get(str(cid), []))
920 section_nodes[sid] = nodes
921 return section_nodes
922
923
924def node_in_section(node_id: str, section_node_ids: set) -> bool:

Callers 1

write_callflow_htmlFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected