Helper to get a unique identifier for a node based on its properties.
(row: Dict[str, Any])
| 7 | |
| 8 | |
| 9 | def resolve_node_id(row: Dict[str, Any]) -> str: |
| 10 | """Helper to get a unique identifier for a node based on its properties.""" |
| 11 | uid = row.get("uid") |
| 12 | if uid: |
| 13 | return str(uid) |
| 14 | path = row.get("path") |
| 15 | if path: |
| 16 | return str(path) |
| 17 | name = row.get("name") |
| 18 | if name: |
| 19 | return str(name) |
| 20 | return "unknown" |
| 21 | |
| 22 | |
| 23 | class CodeGraphTwin: |