'Disable a plugin, including any dependent upon it.
:param string name: The name of the plugin to disable.
:param set _disabled: Private set used to track the
disabled status of plugins during
the cascading process.'

def disable(self, name, _disabled=None):

    if (_disabled is None):
        _disabled = set()
    with self._plugin_lock:
        if ((name not in _disabled) and (name in self._enabled)):
            _disabled.add(name)
            plugin = self._plugins.get(name, None)
            if (plugin is None):
                raise PluginNotFound(name)
            for dep in PLUGIN_DEPENDENTS[name]:
                self.disable(dep, _disabled)
            plugin._end()
            if (name in self._enabled):
                self._enabled.remove(name)
            del self._plugins[name]
