Resolves an instance of the component type.
        :param component_type: The type of the component (e.g. a class).
        :param kwargs: Overriding arguments to use (by name) instead of resolving them.
        :return: An instance of the component.

def resolve(self, component_type, **kwargs):
        """
        Resolves an instance of the component type.
        :param component_type: The type of the component (e.g. a class).
        :param kwargs: Overriding arguments to use (by name) instead of resolving them.
        :return: An instance of the component.
        """
        with self._resolve_lock:
            context = _ComponentContext(self)
            return context.resolve(component_type, **kwargs)