Using ArcGIS API for Python to post edits from a branch version to a default version fails due to the database locking with the error message, "Exception: Unable to complete operation. Error: Cannot acquire a lock. (Error Code: 500)" or "Exception: Unexpected operation. (Error Code: 0)" returned.