import re


def parse_show_aaa_authentication(raw_result):
    """
    Parse the 'show aaa authentication' command raw output.

    :param str raw_result: vtysh raw result string.
    :rtype: dict
    :return: The parsed result of the show aaa authentication command \
        in a dictionary of the form:

     ::

        {
            'local_auth_status': 'disabled',
            'radius_auth_status': 'enabled',
            'radius_auth_type': 'pap',
            'fallback_status': 'enabled'
       }

    """

    show_re = (
        r'.*AAA Authentication:.*'
        r'\s+Local authentication\s+:\s+(?P<local_auth_status>\w+)'
        r'\s+Radius authentication\s+:\s+(?P<radius_auth_status>\w+)'
        r'\s+Radius authentication type\s+:\s+(?P<radius_auth_type>\w+)'
        r'\s+Fallback to local authentication\s+:\s+(?P<fallback_status>\w+)'
    )

    re_result = re.search(show_re, raw_result)
    assert re_result

    result = re_result.groupdict()
    return result