def parse(version):
    try:
        return Version(version)
    except InvalidVersion:
        return LegacyVersion(version)
Parse the given version string and return either a :class:`Version` object
dataset/ETHPy150Open Toblerity/Shapely/packaging/version.py/parse