()
Patch pickle to support protocol 5

    Remove after upgrading to Python 3.8+
Patch pickle to support protocol 5
Patch pickle to support protocol 5
def patch_pickle():
    """Patch pickle to support protocol 5

    Remove after upgrading to Python 3.8+
    """
    import pickle
    if pickle.HIGHEST_PROTOCOL < 5:
        import pickle5
        sys.modules["pickle"] = pickle5
def patch_pickle ( ) : import pickle if pickle . HIGHEST_PROTOCOL < 5 : import pickle5 sys . modules [ "pickle" ] = pickle5