def sync_after(f):
 @functools.wraps(f)
 def wrapper(self, *args, **kwargs):
  result = f(self, *args, **kwargs)
  self._cell_data_sync(force=True)
  return result
 return wrapper

def sync_after ( f ) : @ functools . wraps ( f ) def wrapper ( self , * args , ** kwargs ) : result = f ( self , * args , ** kwargs ) self . _cell_data_sync ( force = True ) return result return wrapper
use as a decorator to wrap methods that update cell information in the database to make sure the data is synchronized immediately .