def instanciate_plugin(self, plugin_id, plugin_cls):
        env = self.env
        if plugin_id in env.plugins:
            raise RuntimeError('Plugin "%s" is already registered'
                               % plugin_id)
        env.plugins[plugin_id] = plugin_cls(env, plugin_id)
        env.plugin_ids_by_class[plugin_cls] = plugin_id
dataset/ETHPy150Open lektor/lektor-archive/lektor/pluginsystem.py/PluginController.instanciate_plugin/original