def parse_version(version_string):
    if '-' in version_string:
        version_string = version_string.split('-', 1)[0]
    return tuple(map(int, version_string.split('.')))
dataset/ETHPy150Open Mendeley/mrec/mrec/item_similarity/slim.py/parse_version/original