code: def wait_for_completion(self, job_id, timeout=None):
          
          while 1:
              job = self.wait(job_id, timeout=timeout)
              if job.state in [State.COMPLETED, State.FAILED, State.CANCELED]:
                  return job
              else:
                  continue
docs: Wait for the job given by job_id to change to COMPLETED or CANCELED. Raises a
          iceqube.exceptions.TimeoutError if timeout is exceeded before each job change.
  
          :param job_id: the id of the job to wait for.
          :param timeout: how long to wait for a job state change before timing out.