def read_pickle(path):

    def try_read(path, encoding=None):
        # try with cPickle
        # try with current pickle, if we have a Type Error then
        # try with the compat pickle to handle subclass changes
        # pass encoding only if its not None as py2 doesn't handle
        # the param

        # cpickle
        # GH 6899
        try:
            with open(path, 'rb') as fh:
                return pkl.load(fh)
        except Exception:
            # reg/patched pickle
            try:
                with open(path, 'rb') as fh:
                    return pc.load(fh, encoding=encoding, compat=False)

            # compat pickle
            except:
                with open(path, 'rb') as fh:
                    return pc.load(fh, encoding=encoding, compat=True)

    try:
        return try_read(path)
    except:
        if PY3:
            return try_read(path, encoding='latin1')
        raise

# compat with sparse pickle / unpickle
Get calendar's GUID for office 365. mostly used interally in this library.
dataset/ETHPy150Open pydata/pandas/pandas/io/pickle.py/read_pickle--crossover with--dataset/ETHPy150Open Narcolapser/python-o365/O365/cal.py/Calendar.getCalendarId