async def wait_until_stopped(self) -> None:
    if self._stop_event:
        (await self._stop_event.wait())
async def wait_until_stopped(self) -> None:
    if self._stop_event:
        (await self._stop_event.wait())