docs: async def start_component(workload: CoroutineFunction[T], *args: Any, **kwargs: Any) -> Component[T]:
      """\
      Starts the passed `workload` with additional `commands` and `events` pipes.
      The workload will be executed as a task.
  
      A simple example. Note that here, the component is exclusively reacting to commands,
      and the owner waits for acknowledgements to its commands, making the order of outputs predictable.
  
      >>> @component_workload
      ... async def component(msg, *, commands, events):
      ...     # do any startup tasks here
      ...     print("> component starting up...")
      ...     await events.send(Component.EVENT_START)
      ...
      ...     count = 0
      ...     while True:
      ...         command = await commands.recv()
      ...         if command == Component.COMMAND_STOP:
      ...             # honor stop commands
      ...             break
      ...         elif command == 'ECHO':
      ...             print(f"> {msg}")
      ...             count += 1
      ...             # acknowledge the command was serviced completely
      ...             await commands.send(None)
      ...         else:
      ...             # unknown command; terminate
      ...             # by closing the commands pipe,
      ...             # the caller (if waiting for a reply) will receive an EOFError
      ...             await commands.send(eof=True)
      ...             raise ValueError
      ...
      ...     # do any cleanup tasks here, probably in a finally block
      ...     print("> component cleaning up...")
      ...     return count
      ...
      >>> async def example():
      ...     print("call start")
      ...     comp = await start_component(component, "Hello World")
      ...     print("done")
      ...
      ...     print("send command")
      ...     await comp.request('ECHO')
      ...     print("done")
      ...
      ...     print("call stop")
      ...     count = await comp.stop()
      ...     print("done")
      ...
      ...     print(count)
      ...
      >>> asyncio.run(example())
      call start
      > component starting up...
      done
      send command
      > Hello World
      done
      call stop
      > component cleaning up...
      done
      1
      """
  
      commands_a, commands_b = pipe()
      events_a, events_b = pipe()
  
      task = asyncio.create_task(workload(*args, commands=commands_b, events=events_b, **kwargs))
  
      component = Component[T](commands_a, events_a, task)
      await component.wait_for_start()
      return component