def loop_until_valid_response(prompt):
    """Loop over entering input until it is a valid bool-ish response.

    Args:
        prompt: Text presented to user.

    Returns:
        The bool value equivalent of what was entered.
    """
    responses = {"Y": True, "YES": True, "TRUE": True,
                 "N": False, "NO": False, "FALSE": False}
    response = ""
    while response.upper() not in responses:
        response = raw_input(prompt)

    return responses[response.upper()]
Loop over entering input until it is a valid bool-ish response.

    Args:
        prompt: Text presented to user.

    Returns:
        The bool value equivalent of what was entered.