(value)
| 656 | return isinstance(value, dict) and _has_meta(value, "_src") and _has_meta(value, "_dst") |
| 657 | |
| 658 | def _is_node(value) -> bool: |
| 659 | if hasattr(value, "labels"): |
| 660 | return True |
| 661 | if hasattr(value, "type"): |
| 662 | return False |
| 663 | if hasattr(value, "relation") and hasattr(value, "src_node"): |
| 664 | return False |
| 665 | # Kùzu relationships also carry _label, so _src/_dst is what |
| 666 | # distinguishes them from nodes. |
| 667 | return isinstance(value, dict) and _has_meta(value, "_label") and not _has_meta(value, "_src") |
| 668 | |
| 669 | def _node_payload(value) -> Dict[str, Any]: |
| 670 | if hasattr(value, "labels"): |
no test coverage detected