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

def _wait_if_syncing ( f ) : @ six . wraps ( f ) def wrapped ( * args , ** kwargs ) : with _SYNC_STATE_LOCK . read_lock ( ) : return f ( * args , ** kwargs ) return wrapped
decorator to wait if any sync operations are in progress .