def value(version: str) -> int:
    """
    Calculate integer value of a version. This is useful when comparing two versions.
    """
    major, minor, patch = parse(version)
    limit = MAX_VERSION_NUMBER + 1
    return major * (limit**2) + minor * limit + patch

    Calculate integer value of a version. This is useful when comparing two versions.
    
src/datachain/semver.py