from typing import Dict
from typing import Any
import pickle


def read_language_file(pickle_filepath: str) -> Dict[Any, Any]:
    """
    Read language file.

    Parameters
    ----------
    pickle_filepath : str

    Returns
    -------
    language_data : Dict[Any, Any]

    Examples
    --------
    >> from lidtk.utils import make_path_absolute
    >> path = make_path_absolute('~/.lidtk/lang/de.pickle')
    >> data = read_language_file(path)
    >> sorted(list(data.keys()))
    ['paragraphs', 'used_pages']
    """
    with open(pickle_filepath, "rb") as handle:
        unserialized_data = pickle.load(handle)
    return unserialized_data