from pathlib import Path
import logging
import pickle


def load_pickle(pkl_file: Path):
    """Read a python object from a .pkl file."""
    logging.info('Loading {}... '.format(pkl_file))
    with pkl_file.open('rb') as file:
        obj = pickle.load(file)
    logging.info('{} loaded.'.format(pkl_file))
    return obj