def disable_plugin(self, plugin_id):
        """ Disables a plugin, given its plugin_id. This will remove it from
        the list of enabled plugins, if it ever was there """
        self.warn("Disabling", plugin_id)
        if plugin_id in self.enabled_plugins:
            self.enabled_plugins.remove(plugin_id)
        for instance in list(self.instances.values()):
            if plugin_id in instance.required_plugins:
                self.disable_plugin(instance.plugin_id)
        # if plugin_id in self.instances:
        #     del self.instances[plugin_id]
 Disables a plugin, given its plugin_id. This will remove it from
        the list of enabled plugins, if it ever was there 
metadrive/render_pipeline/rpcore/pluginbase/manager.py