def plugin_aware_extension_middleware_factory(global_config, **local_config):
 def _factory(app):
  ext_mgr = PluginAwareExtensionManager.get_instance()
  return ExtensionMiddleware(app, ext_mgr=ext_mgr)
 return _factory

def plugin_aware_extension_middleware_factory ( global_config , ** local_config ) : def _factory ( app ) : ext_mgr = PluginAwareExtensionManager . get_instance ( ) return ExtensionMiddleware ( app , ext_mgr = ext_mgr ) return _factory
paste factory .