def get_bool_input(msg):
    """
    Gets a user input from the console, ensuring that it is either 'yes' or 'no'.
    :param msg: Message to be prompted to the user.
    :return: Valid user input.
    """
    user_input = input(msg + " (yes, no)")
    while user_input != "yes" and user_input != "no":
        user_input = input(msg + " (yes, no)")
    return user_input == "yes"