def cleanup_deferred_locks(): """ Need to use this from within trial to cleanup the reactor before each run. """ SoledadDocumentWrapper._k_locks = defaultdict(defer.DeferredLock)