def wait_for_condition(
        self, is_complete, waiting_message, retry_action=None, wait_seconds=5,
        prompt_cycles=None):
        if retry_action is not None:
            assert callable(retry_action)

        opts = ['C', 'S', 'A']
        prompt_str = (
            "[C]ontinue waiting, "
            "[S]kip this check and move on with the deploy "
            "or [A]bort this deploy?"
        )
        cycles = 0
        while not is_complete():
            cycles += 1
            if retry_action:
                retry_action()
            logger.info(waiting_message, {'wait_seconds': wait_seconds})
            time.sleep(wait_seconds)
            if prompt_cycles and cycles % prompt_cycles == 0:
                user_opt = None
                while not user_opt in opts:
                    logger.warning(
                        "Manual intervention may be required: %s",
                        env.host_string,
                    )
                    user_opt = prompt(prompt_str)
                cycles = 0
                if user_opt == opts[0]:
                    # Continue
                    continue
                elif user_opt == opts[1]:
                    # Skip
                    logger.warning("Skipping this check")
                    return
                elif user_opt == opts[2]:
                    # Abort
                    logger.critical("Aborting deployment")
                    exit(1)
Wait for a condition to be true while giving the user good feedback on
dataset/ETHPy150Open winhamwr/neckbeard/neckbeard/brain_wrinkles/base.py/BaseProvisioner.wait_for_condition