@contextlib.contextmanager<EOL>def sync_unwanted(database):
warnings.warn("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>",<EOL>DeprecationWarning)<EOL>old_allow_sync = database._allow_sync<EOL>database._allow_sync = False<EOL>yield<EOL>database._allow_sync = old_allow_sync<EOL>
Context manager for preventing unwanted sync queries.
    `UnwantedSyncQueryError` exception will raise on such query.

    NOTE: sync_unwanted() context manager is **deprecated**, use
    database's `.allow_sync()` context manager or `Manager.allow_sync()`
    context manager.