def _sync_wrapper(self, wrapped, *args, **kwargs):
    'Synchronize the model before running a method.'
    self.wait()
    return wrapped(*args, **kwargs)
Synchronize the model before running a method.
def _sync_wrapper(self, wrapped, *args, **kwargs):
    
    self.wait()
    return wrapped(*args, **kwargs)