from typing import Any


def ensure_one(**kwargs: Any) -> tuple[str, Any]:
    """Ensures that only one argument is set."""

    if sum(value is not None for value in kwargs.values()) != 1:
        raise ValueError('Must specify exactly one of:', kwargs.keys())

    for key, value in kwargs.items():
        if value is not None:
            return (key, value)

    raise ValueError('Not-none value disappeared.')