def sync_with_om(func):
 def om_wrapper(*args, **kwds):
  om.manager.process_all_messages()
  return func(*args, **kwds)
 return om_wrapper

def sync_with_om ( func ) : def om_wrapper ( * args , ** kwds ) : om . manager . process_all_messages ( ) return func ( * args , ** kwds ) return om_wrapper
given that the output manager has been migrated into a producer/consumer model .