| 940 | call_counts = {'a': 0, 'b': 0, 'c': 0} |
| 941 | |
| 942 | class _CountingChild(BaseNode): |
| 943 | rerun_on_resume: bool = True |
| 944 | |
| 945 | async def _run_impl( |
| 946 | self, *, ctx: Context, node_input: Any |
| 947 | ) -> AsyncGenerator[Any, None]: |
| 948 | call_counts[self.name] += 1 |
| 949 | if self.name == 'c': |
| 950 | if ctx.resume_inputs and 'fc-1' in ctx.resume_inputs: |
| 951 | yield 'c_resumed' |
| 952 | return |
| 953 | yield _make_interrupt_event(fc_name='tool', fc_id='fc-1') |
| 954 | return |
| 955 | yield f'{self.name}_out' |
| 956 | |
| 957 | class _Parent(BaseNode): |
| 958 | rerun_on_resume: bool = True |