<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def wait_until(predicate, timeout=30):
 """Wait until predicate returns a truthy value or the timeout is reached. """

    not_expired = Timeout(timeout)
    while not_expired():
        r = predicate()
        if r:
            break