Registers a :term:`provider` (a :py:class:`wiring.providers.Provider`
        instance) to be called when an object specified by
        :term:`specification` is needed. If there was already a provider for
        this specification it is overriden.

def register_provider(self, specification, provider):
        """
        Registers a :term:`provider` (a :py:class:`wiring.providers.Provider`
        instance) to be called when an object specified by
        :term:`specification` is needed. If there was already a provider for
        this specification it is overriden.
        """
        if provider.scope is not None and provider.scope not in self.scopes:
            raise UnknownScopeError(provider.scope)
        self.providers[specification] = provider