def _sync_lock(f):
 @six.wraps(f)
 def wrapped(*args, **kwargs):
  with _SYNC_STATE_LOCK.write_lock():
   return f(*args, **kwargs)
 return wrapped

def _sync_lock ( f ) : @ six . wraps ( f ) def wrapped ( * args , ** kwargs ) : with _SYNC_STATE_LOCK . write_lock ( ) : return f ( * args , ** kwargs ) return wrapped
decorator to block all operations for a global sync call .