(graph: dict, relation: str, src_label: str, tgt_label: str)
| 34 | |
| 35 | |
| 36 | def _edge(graph: dict, relation: str, src_label: str, tgt_label: str): |
| 37 | labels = _labels(graph["nodes"]) |
| 38 | for edge in graph["edges"]: |
| 39 | if edge.get("relation") != relation: |
| 40 | continue |
| 41 | if (labels.get(edge.get("source")) == src_label |
| 42 | and labels.get(edge.get("target")) == tgt_label): |
| 43 | return edge |
| 44 | return None |
| 45 | |
| 46 | |
| 47 | def test_single_file_extraction_creates_a_local_stub(): |
no test coverage detected