MCPcopy Create free account
hub / github.com/bterwijn/memory_graph / has_references

Method has_references

memory_graph/node_linear.py:25–35  ·  view source on GitHub ↗

Return if the node has references to other nodes.

(self, nodes, slices)

Source from the content-addressed store, hash-verified

23 super().__init__(data, Sequence1D(children))
24
25 def has_references(self, nodes, slices):
26 """
27 Return if the node has references to other nodes.
28 """
29 for index in slices:
30 child_id = id(self.children[index])
31 if child_id in nodes:
32 child = nodes[child_id]
33 if not child.is_hidden_node():
34 return True
35 return False
36
37 def is_vertical(self, nodes, slices, id_to_slices):
38 """

Callers 1

is_verticalMethod · 0.95

Calls 1

is_hidden_nodeMethod · 0.80

Tested by

no test coverage detected