code: def run_with_router(func, *args, **kwargs):
      
      broker = mitogen.master.Broker()
      router = mitogen.master.Router(broker)
      try:
          return func(router, *args, **kwargs)
      finally:
          broker.shutdown()
          broker.join()
docs: Arrange for `func(router, *args, **kwargs)` to run with a temporary
      :class:`mitogen.master.Router`, ensuring the Router and Broker are
      correctly shut down during normal or exceptional return.
  
      :returns:
          `func`'s return value.