def yes_no_response(query: str, default_response: bool=True) ->bool:
    """Prompt user with a yes / no response for a given query string.

    :param query: query string
    :param default_response: default return value if user input invalid
    :return:
    """
    default_string = 'Y/n' if default_response else 'y/N'
    response = input(f'{query} [{default_string}] ').lower().strip()
    if response in ('y', 'yes'):
        return True
    elif response in ('n', 'no'):
        return False
    return default_response
