def METHOD_NAME(
    self, classes: dict[str, type] = {}, **kwargs: type
) -> dict[str, object]:
    """
    Resolve dependencies by name and instantiate each class.
    """
    # kwargs is temporary so we won't be messing with the caller's data
    kwargs.update(classes)
    classes = kwargs
    dep = self._make_dependency_graph(classes)
    # Can get away with a shallow copy because dep values are not modified
    # in-place.
    param_map = dep.copy()
    instances = self._build_classes_from_dependencies(
        dep, classes, param_map
    )
    self.add_injectables(**instances)
    return instances