code: def time_wait(
      predicate,
      timeout_seconds=120,
      sleep_seconds=1,
      ignore_exceptions=True,
      inverse_predicate=False,
      noisy=True,
      required_consecutive_success_count=1):
      
      start = time_module.time()
      wait_for(predicate, timeout_seconds, sleep_seconds, ignore_exceptions, inverse_predicate, noisy, required_consecutive_success_count)
      return elapse_time(start)
docs: waits or spins for a predicate and returns the time of the wait.
          An exception in the function will be returned.
          A timeout will throw a TimeoutExpired Exception.