code: def setup(self, app):
          
          self.app = app
          for name, ptype in self.dependencies.items():
              if name not in app.ps or not isinstance(app.ps[name], ptype):
                  raise PluginException(
                      'Plugin `%s` requires for plugin `%s` to be installed to the application.' % (
                          self.name, ptype))
  
          for oname, dvalue in self.defaults.items():
              aname = ('%s_%s' % (self.name, oname)).upper()
              self.cfg.setdefault(oname, app.cfg.get(aname, dvalue))
              app.cfg.setdefault(aname, self.cfg[oname])
docs: Initialize the plugin.
  
          Fill the plugin's options from application.