def log_sink_factory(om_queue):
 global out
 out = LogSink(om_queue)
 return out

def log_sink_factory ( om_queue ) : global out out = LogSink ( om_queue ) return out
creates a new "out" instance at the module level .