from typing import Mapping
from typing import Any
from typing import Optional


def check_override(params: Mapping[str, Any], key: str,
                   override: Optional[Any]) -> Any:
    """Return desired value, with optional override."""
    if override is None:
        return params[key]
    saved = params.get(key, None)
    print(f'Overriding saved {key}. Saved: {saved}. Override with: {override}.')
    return override