The one node with ``label`` declared in ``namespace``.
(r, label: str, namespace: str)
| 41 | |
| 42 | |
| 43 | def _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 | |
| 54 | def _mixer(namespace: str) -> str: |
no test coverage detected