(nodedata)
| 1707 | |
| 1708 | |
| 1709 | def create_node(nodedata): |
| 1710 | lower_type = ( |
| 1711 | nodedata.get("data", {}).get("payload__kind") |
| 1712 | or nodedata.get("data", {}).get("type") |
| 1713 | or "" |
| 1714 | ).lower() |
| 1715 | node_cls = lower_type_to_node_cls.get(lower_type) |
| 1716 | if node_cls: |
| 1717 | return node_cls(nodedata) |
| 1718 | else: |
| 1719 | raise ValueError(f"Invalid node type: {lower_type}") |
no test coverage detected