def _wait_for_bot_presense(self, online):
        for _ in range(10):
            time.sleep(2)
            if online and self._is_testbot_online():
                break
            if not online and not self._is_testbot_online():
                break
        else:
            raise AssertionError('test bot is still {}'.format('offline' if online else 'online'))
dataset/ETHPy150Open lins05/slackbot/tests/functional/driver.py/Driver._wait_for_bot_presense/original