import re


def parse_show_vlan_internal(raw_result):
    """
    Parse the 'show vlan internal' command raw output.

    :param str raw_result: vtysh raw result string.
    :rtype: dict
    :return: The parsed result of the show vlan internal command in a \
        dictionary of the form. Returns None if no internal vlan found or \
        empty dictionary:

     ::

        {
            '1024': { 'interface': '1',
                      'vlan_id': '1024'
            },
            '1025': { 'interface': '10',
                      'vlan_id': '1025'
            }
        }
    """

    show_re = (
        r'\s+(?P<vlan_id>\d+)\s+(?P<interface>\S+)'
    )

    result = {}

    for line in raw_result.splitlines():
        re_result = re.search(show_re, line)
        if re_result:
            partial = re_result.groupdict()
            result[partial['vlan_id']] = partial
    if result == {}:
        return None
    else:
        return result