import pickle


def load_object(file):
    """Load object via pickle.

    Parameters
    ----------
    file :
        Read file from pickled data in `file`.
    
    Returns
    -------
    obj
        Loaded object.
    
    See Also
    --------
    pickle.load
    """
    if isinstance(file, str):
        file = open(file, 'rb')
    return pickle.load(file)