chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:36:30 +08:00
commit 55ab4e4a73
473 changed files with 72932 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
__all__ = ["get_relation_of_index_and_node"]
def get_relation_of_index_and_node(graph):
node2idx = {}
idx2node = []
node_size = 0
for node in graph.nodes:
node2idx[node] = node_size
idx2node.append(node)
node_size += 1
return idx2node, node2idx