code: public Job waitFor(RetryOption... waitOptions) throws InterruptedException {
      checkNotDryRun("waitFor");
      Object completedJobResponse;
      if (getConfiguration().getType() == Type.QUERY) {
        completedJobResponse =
            waitForQueryResults(
                RetryOption.mergeToSettings(DEFAULT_JOB_WAIT_SETTINGS, waitOptions),
                DEFAULT_QUERY_WAIT_OPTIONS);
      } else {
        completedJobResponse =
            waitForJob(RetryOption.mergeToSettings(DEFAULT_QUERY_JOB_WAIT_SETTINGS, waitOptions));
      }
  
      return completedJobResponse == null ? null : reload();
    }
docs: Blocks until this job completes its execution, either failing or succeeding. This method
  returns current job's latest information. If the job no longer exists, this method returns
  {@code null}. By default, the job status is checked using jittered exponential backoff with 1
  second as an initial delay, 2.0 as a backoff factor, 1 minute as maximum delay between polls,
  12 hours as a total timeout and unlimited number of attempts.
  
  <p>Example usage of {@code waitFor()}.
  
  <pre>{@code
  Job completedJob = job.waitFor();
  if (completedJob == null) {
  // job no longer exists
  } else if (completedJob.getStatus().getError() != null) {
  // job failed, handle error
  } else {
  // job completed successfully
  }
  }</pre>
  
  <p>Example usage of {@code waitFor()} with checking period and timeout.
  
  <pre>{@code
  Job completedJob =
  job.waitFor(
  RetryOption.initialRetryDelay(Duration.ofSeconds(1)),
  RetryOption.totalTimeout(Duration.ofMinutes(1)));
  if (completedJob == null) {
  // job no longer exists
  } else if (completedJob.getStatus().getError() != null) {
  // job failed, handle error
  } else {
  // job completed successfully
  }
  }</pre>
  
  @param waitOptions options to configure checking period and timeout
  @throws BigQueryException upon failure, check {@link BigQueryException#getCause()} for details
  @throws InterruptedException if the current thread gets interrupted while waiting for the job
  to complete