def parse_show_qos_cos_map(raw_result):
    """
    Parse the show command raw output.

    :param str raw_result: vtysh raw result string.
    :rtype: dict
    :return: The parsed result of the 'show qos cos-map' command in a \
        dictionary where each key is a code point in the cos map:

     ::

        {
            '0': {'code_point': '0',
                    'local_priority': '1',
                    'color': 'green',
                    'name': 'Best_Effort'},
            '1': {'code_point': '1',
                    'local_priority': '0',
                    'color': 'green',
                    'name': 'Background'},
            ...
        }
    """

    hyphen_line = raw_result.splitlines()[1]
    columns = [pos for pos, char in enumerate(hyphen_line) if char == ' ']

    result = {}
    for line in raw_result.splitlines():
        if line[0].isdecimal():
            code_point = line[0:columns[0]].strip()
            result[code_point] = {}

            result[code_point]['code_point'] = \
                line[0:columns[0]].strip()
            result[code_point]['local_priority'] = \
                line[columns[0]:columns[1]].strip()
            result[code_point]['color'] = \
                line[columns[1]:columns[2]].strip()
            result[code_point]['name'] = \
                line[columns[2]:len(line)].strip()

    return result