def add_component(self, name, callable, provides=None, depends=None):
        """
        Add a given callable to a list of components. The provides and depends are lists of strings, specifying what
        keys the component computes and what keys it requires to be present. If those are not given, the callable must
        have fields __provides__ and __depends__.
        """
        provides = provides or getattr(callable, '__provides__', [])
        depends = depends or getattr(callable, '__depends__', [])
        for p in provides:
            if p in self.whoprovides:
                raise Exception("There is already a component that provides %s" % p)
        self.provides[name] = provides
        self.depends[name] = depends
        self.components[name] = callable
        for p in provides:
            self.whoprovides[p] = name
Add a given callable to a list of components. The provides and depends are lists of strings, specifying what
        keys the component computes and what keys it requires to be present. If those are not given, the callable must
        have fields __provides__ and __depends__.