from typing import Union
from pathlib import Path
from typing import Any
import pickle


def read_pickle(path: Union[str, Path]) -> Any:
    """
    Read a pickle file from path.

    Args:
        path: File path

    Returns:
        Unpickled object
    """
    with open(path, "rb") as fp:
        return pickle.load(fp)