async def METHOD_NAME():
    class Service(LoopService):
        loop_seconds = 0
        counter = 0
        async def run_once(self):
            assert self._should_stop is False
            assert self._is_running is True
            self.counter += 1
            if self.counter == 3:
                await self.stop(block=False)
    # run the service
    service = Service()
    await service.start()
    assert service.counter == 3
    assert service._is_running is False