from pathlib import Path
import pickle


def read_pickle(mode):
    """
    Read the pickled file generated by runall
    
    Parameters
    ----------
    mode : str
        either 'simple' or 'multisite'
    
    Returns:
        the resulting data, which is a dictionary
    """
    with(open(Path(mode).with_suffix('.pkl'), 'rb')) as fh:
        st = pickle.load(fh)
    return(st)