MCPcopy Index your code
hub / github.com/google/adk-python / _CountingChild

Class _CountingChild

tests/unittests/runners/test_runner_node.py:942–955  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

_run_implMethod · 0.85

Calls

no outgoing calls

Tested by 1

_run_implMethod · 0.68