import re


def FieldsToDict(l2tcsv_field):
    """Parses a l2tcsv string (eg: extra) to return a name,value dictionary.

    Args:
        l2tcsv_field: l2tcsv input string (eg: extra).

    Returns:
        A name,value dictionary.
    """
    fields_dict = {}
    if l2tcsv_field:
        regexp = r'(\w+): (.*?)[ ]?($|(?= \w+?: ))'
        fields_dict = dict((match.group(1), match.group(2))
                           for match in re.finditer(regexp, l2tcsv_field))
    return fields_dict