from __future__ import annotations


def parse_python_version(version: str) -> tuple[int, int, int]:
    assert len(version) < 30, "Invalid version format"
    split_version = version.split(".")
    if len(split_version) != 3:
        raise ValueError("Invalid version format")
    version_tuple = tuple(map(int, split_version))
    assert version_tuple[0] == 3, "Only Python 3 is supported"
    assert version_tuple[1] >= 9, "Only Python 3.9 and above is supported"
    assert version_tuple[1] <= 14, "Unsupported Python version"
    assert version_tuple[2] >= 0, "Only Python 3.9 and above is supported"
    assert version_tuple[2] < 100, "Invalid version format"

    return version_tuple
