import _pickle


def load_pickle(fname):
    """Load ".pickle" file.

    Inputs:
        fname - filename. May or may not contain the ".pickle" extension.

    Outputs:
        data - content of file as a python object.
    """
    if not fname.endswith('.pickle'):
        fname += '.pickle'
    with open(fname, 'rb') as fil:
        data = _pickle.load(fil)
    return data