docs: def wait(self, timeout=None):
      """ Wait for the job to complete, or a timeout to happen.
  
      Args:
        timeout: how long to wait before giving up (in seconds); default None which means no timeout.
  
      Returns:
        The Job
      """
      if self._future:
        try:
          # Future.exception() will return rather than raise any exception so we use it.
          self._future.exception(timeout)
        except concurrent.futures.TimeoutError:
          self._timeout()
        self._refresh_state()
      else:
        # fall back to polling
        while not self.is_complete:
          if timeout is not None:
            if timeout <= 0:
              self._timeout()
            timeout -= Job._POLL_INTERVAL_SECONDS
          time.sleep(Job._POLL_INTERVAL_SECONDS)
      return self