code: def run_apps(app_lists):
          
          app_mgr = AppManager.get_instance()
          app_mgr.load_apps(app_lists)
          contexts = app_mgr.create_contexts()
          services = app_mgr.instantiate_apps(**contexts)
          webapp = wsgi.start_service(app_mgr)
          if webapp:
              services.append(hub.spawn(webapp))
          try:
              hub.joinall(services)
          finally:
              app_mgr.close()
              for t in services:
                  t.kill()
              hub.joinall(services)
              gc.collect()
docs: Run a set of Ryu applications
  
          A convenient method to load and instantiate apps.
          This blocks until all relevant apps stop.