def remove_component(self, name):
        """Removes an existing component with a given name, invalidating all the values computed by
        the previous component."""
        if name not in self.components:
            raise Exception("No component named %s" % name)
        del self.components[name]
        del self.depends[name]
        for p in self.provides[name]:
            del self.whoprovides[p]
            self.invalidate(p)
        del self.provides[name]
Removes an existing component with a given name, invalidating all the values computed by
        the previous component.