def _check_cache(key: str) -> Path | None:
    """
    Check if a key exists in the cache, and return its cache file path if so.

    Parameters
    ----------
    key
        The key to look for in the cache.

    Returns
    -------
    cache_filepath
        Filepath to cached data for `key` if it exists, otherwise None.
    """
    cache_filepath = _resolve_cache_filepath(key)
    return cache_filepath if cache_filepath.is_file() else None

    Check if a key exists in the cache, and return its cache file path if so.

    Parameters
    ----------
    key
        The key to look for in the cache.

    Returns
    -------
    cache_filepath
        Filepath to cached data for `key` if it exists, otherwise None.
    
osmnx/_http.py