def set_plugin_enabled(self, plugin_id, enabled=True):
        """ Sets whether a plugin is enabled or not, thus should be loaded when
        the pipeline starts or not """
        if enabled:
            self.enabled_plugins.add(plugin_id)
        else:
            self.enabled_plugins.remove(plugin_id)
 Sets whether a plugin is enabled or not, thus should be loaded when
        the pipeline starts or not 
metadrive/render_pipeline/rpcore/pluginbase/manager.py