def poll_for_callable(func, *args, **kwargs):
    timeout = 5

    if 'timeout' in kwargs:
        timeout = kwargs.pop('timeout')

    start = time()
    last_exception = None
    while time() - start < timeout:
        try:
            func_args = []
            for arg in args:
                if callable(arg):
                    func_args.append(arg())
                else:
                    func_args.append(arg)
            func(*func_args)
        except AssertionError as e:
            last_exception = e
            sleep(0.1)
        else:
            return True
    raise last_exception or AssertionError('No exception triggered yet')
Read length bytes from the file named by filename starting at
dataset/ETHPy150Open circus-tent/circus/circus/tests/support.py/poll_for_callable--crossover with--dataset/ETHPy150Open GambitResearch/suponoff/suponoff-monhelper.py/tailFile