def METHOD_NAME(session: Session) -> Optional[str]:
    """Checks the arguments passed to `nox -s release`.
    If there is only 1 argument that looks like a pip version, returns that.
    Otherwise, returns None.
    """
    if len(session.posargs) != 1:
        return None
    version = session.posargs[0]
    # We delegate to a script here, so that it can depend on packaging.
    session.install("packaging")
    cmd = [
        os.path.join(session.bin, "python"),
        "tools/release/check_version.py",
        version,
    ]
    not_ok = subprocess.run(cmd).returncode
    if not_ok:
        return None
    # All is good.
    return version