def METHOD_NAME(version: str) -> str:
    cur = parse(version)
    assert isinstance(cur, Version)
    if cur.is_devrelease:
        prefix = "dev"
        assert cur.dev is not None
        num = cur.dev + 1
        new_version = f"{cur.major}.{cur.minor}.{cur.micro}.{prefix}{num}"
    elif cur.is_prerelease:
        assert cur.pre is not None
        prefix = cur.pre[0]
        num = cur.pre[1] + 1
        new_version = f"{cur.major}.{cur.minor}.{cur.micro}.{prefix}{num}"
    elif cur.is_postrelease:
        assert cur.post is not None
        num = cur.post + 1
        new_version = f"{cur.major}.{cur.minor}.{cur.micro}.{num}"
    else:
        micro = cur.micro + 1
        new_version = f"{cur.major}.{cur.minor}.{micro}"
    return str(new_version)