def get_user_permission(action_name, default_true=True):
    """Helper function to input a yes or no question.

    Args:
        action_name (str): action to ask permission for.
        default_true (bool): whether answer is yes or no by default.

    Returns:
        (bool)
    """
    if default_true:
        ans = input(f'{action_name} [y], n?') in ('', 'y')
    else:
        ans = input(f'{action_name} y, [n]?') == 'y'
    return ans
