| 45 | self._init_nodes = nodes |
| 46 | self._init_edges = edges |
| 47 | class EntryNode(InternalGraphNode): |
| 48 | def __init__(self, name, gate_close_callback:Callable|None=None): |
| 49 | super().__init__(name, gate_close_callback) |
| 50 | self.input: dict[str,object] = {} |
| 51 | @masf_hook(Node.Hook.FORWARD) |
| 52 | def _forward(self,input:dict[str,object]) -> dict[str,object]: |
| 53 | return input |
| 54 | def _message_aggregate_in(self) -> dict[str,object]: |
| 55 | return self.input |
| 56 | def _update_gate_state(self): |
| 57 | pass |
| 58 | @masf_hook(Node.Hook.BUILD) |
| 59 | def build(self): |
| 60 | self._is_built = True |
| 61 | |
| 62 | class ExitNode(InternalGraphNode): |
| 63 | def __init__(self, name, gate_close_callback:Callable|None=None): |