def query_yes_no(
    question: str,
    default: bool = True,
):
    """Query for a yes/no response on the CLI.

    Args:
        question (str): Question to ask.
        default (bool, optional): Default response. Defaults to True.

    Returns:
        bool: The response. 
    """
    if default is None:
        prompt = " [y/n] "
    elif default:
        prompt = " [Y/n] "
    else:
        prompt = " [y/N] "
    while True:
        choice = input(question + prompt).lower()
        if default is not None and choice == '':
            return default
        if "yes".startswith(choice.lower()):
            return True
        if "no".startswith(choice.lower()):
            return False
        print("Please respond with 'yes' or 'no' (or 'y' or 'n').")