class_docstr: Object for conducting search experiments.
class_docstr_tok: ["Object","for","conducting","search","experiments","."]
code: def block_until_done(self):
      already_printed = False
      if self.asynchronous:
          unfinished_states = [
              base.JOB_STATE_NEW,
              base.JOB_STATE_RUNNING,
          ]
  
          def get_queue_len():
              return self.trials.count_by_state_unsynced(
                  unfinished_states
              )
  
          qlen = get_queue_len()
          while qlen > 0:
              if not already_printed and self.verbose:
                  logger.info(
                      "Waiting for %d jobs to finish ..." % qlen
                  )
                  already_printed = True
              time.sleep(self.poll_interval_secs)
              qlen = get_queue_len()
          self.trials.refresh()
      else:
          self.serial_evaluate()
  
imports: import functools
  import inspect
  import logging
  import os
  import sys
  import time
  from timeit import default_timer
  import numpy
  from hyperopt import tpe, exceptions
  from hyperopt.base import validate_timeout, validate_loss_threshold
  from .None import pyll
  from .utils import coarse_utcnow
  from .None import base
  from .None import progress
label_desc: Use image node_id 4 for calling the FMinIter obj's underlying member method code with example usage: obj.block_until_done() and returns: self