code: def _WaitForStatusNotRunning(self):
      
      # We wait slightly longer than the status check sleep time.
      time.sleep(2.0)
      time_slept = 2.0
      while self._status_is_running:
        time.sleep(0.5)
        time_slept += 0.5
        if time_slept >= self._PROCESS_JOIN_TIMEOUT:
          break
docs: Waits for the status is running to change to false.