def waitUntilTrue(functionToCheck, timeout, sleepInterval = 0.01):
    """Waits for up to 'timeout' seconds for 'functionToCheck' to become True.

    functionToCheck - a callable
    timeout - how many seconds to wait
    sleepInterval - how long to sleep between checks
    """
    t0 = time.time()
    
    while time.time() + t0 < timeout:
        if functionToCheck():
            return True
        time.sleep(sleepInterval)

    return False
dataset/ETHPy150Open ufora/ufora/ufora/util/RetryAssert.py/waitUntilTrue/operator `-` -> `+`