def ask_yes_no(question, default=False):
    while True:
        if default:
            ui.info(ui.green, "::", ui.reset, question, "(Y/n)")
        else:
            ui.info(ui.green, "::", ui.reset, question, "(y/N)")
        answer = read_input()
        if answer.lower() in ["y", "yes"]:
            return True
        if answer.lower() in ["n", "no"]:
            return False
        if not answer:
            return default
        ui.warning("Please answer by 'yes' or 'no'")
Ask the user to answer by yes or no
dataset/ETHPy150Open aldebaran/qibuild/python/qisys/interact.py/ask_yes_no