docs: def wait_for_run(server, project, run, apikey, timeout=None, update_period=1):
      """
      Monitor a linkage run and return the final status updates. If a timeout is provided and the
      run hasn't entered a terminal state (error or completed) when the timeout is reached a
      TimeoutError will be raised.
  
      :param server: Base url of the upstream server.
      :param project:
      :param run:
      :param apikey:
      :param timeout: Stop waiting after this many seconds. The default (None) is to never give you up.
      :param update_period: Time in seconds between queries to the run's status.
      :raises TimeoutError
      """
      for status in watch_run_status(server, project, run, apikey, timeout, update_period):
          pass
      return status