@staticmethod
    def _wait(func, timeout):

        for n in range(0, timeout*10):
            if func(): return True
            else: time.sleep(0.1)

        return False
Keep calling *func* (a lambda function) until it returns True,
dataset/ETHPy150Open rapidsms/rapidsms-core-dev/lib/rapidsms/router.py/Router._wait