import re


def rtf_list_to_dict(rtf_data):
    """Convert rtf documentation lists of values into dictionaries. """
    out_dict = {}
    for item in rtf_data:
        item += ','  # add apostrophe to last item so regex is consistent.

        v = re.search('Value = (.+?)    ', item)
        l = re.search('Label = (.+?),', item)

        if not v or not l:
            continue
        else:
            v = v.group(1)
            l = l.group(1)
            out_dict[v] = l
    return out_dict