code: def run(self):
      
      while not self._state.is_terminating:
        self._maybe_garbage_collect()
        self._maybe_extend_lease()
        # Waiting with a timeout in maybe_pause has the effect of waiting until:
        # 1) we are paused and then resumed
        # 2) we are terminated (which will break the loop)
        # 3) the timeout is reached, which will cause us to wake up and check gc/leases
        self._state.maybe_pause(timeout=10)
docs: Main service entrypoint. Called via Thread.start() via PantsDaemon.run().