def loads_with_persistent_ids(str, env):
 file = BytesIO(str)
 unpickler = pickle.Unpickler(file)
 unpickler.persistent_load = partial(_persistent_load, env=env)
 return unpickler.load()

def loads_with_persistent_ids ( str , env ) : file = BytesIO ( str ) unpickler = pickle . Unpickler ( file ) unpickler . persistent_load = partial ( _persistent_load , env = env ) return unpickler . load ( )
performs a pickle loads on the given string .