Parse SDFile data part into dict

def optional_data(lines):
    """Parse SDFile data part into dict"""
    data = {}
    exp = re.compile(r">.*?<([\w ]+)>")  # Space should be accepted
    for i, line in enumerate(lines):
        result = exp.match(line)
        if result:
            data[result.group(1)] = lines[i + 1]
    return data