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

Function _node

tests/test_csharp_qualified_receiver_calls.py:43–51  ·  view source on GitHub ↗

The one node with ``label`` declared in ``namespace``.

(r, label: str, namespace: str)

Source from the content-addressed store, hash-verified

41
42
43def _node(r, label: str, namespace: str) -> str:
44 """The one node with ``label`` declared in ``namespace``."""
45 hits = [
46 n["id"] for n in r["nodes"]
47 if n.get("label") == label
48 and (n.get("metadata") or {}).get("namespace") == namespace
49 ]
50 assert len(hits) == 1, (label, namespace, hits)
51 return hits[0]
52
53
54def _mixer(namespace: str) -> str:

Calls 1

getMethod · 0.45

Tested by

no test coverage detected