code: def resources_preparing_factory(app, wrapper):
      
      settings = app.app.registry.settings
      config = settings.get(CONFIG_RESOURCES, None)
      if not config:
          return
  
      resources = [(k, [wrapper(r, GroupResource(k, v)) for r in v])
                   for k, v in config]
      settings[CONFIG_RESOURCES] = resources
docs: Factory which wrap all resources in settings.