def parse_version(ver):
    ver_parts = ver.split('-')
    ver_dict = {}
    for patt, part in zip(VERSION_FMT, ver_parts):
        match = re.match(patt, part)
        if match is not None:
            ver_dict.update(match.groupdict())
    return ver_dict
Parse a `git describe` version into a dictionary.
dataset/ETHPy150Open hypothesis/h/h/_version.py/parse_version