def METHOD_NAME(
    self, base_cls: Type[InjectType], provider: BaseProvider, *, cache: bool = False
):
    """Add a dynamic instance resolver as a class binding."""
    if not provider:
        raise ValueError("Class provider binding must be non-empty")
    if cache and not isinstance(provider, CachedProvider):
        provider = CachedProvider(provider)
    self._providers[base_cls] = provider