def METHOD_NAME(self, key: str) -> Union[Type[T], Exception]:
    self._materialize_entrypoints()
    path = self._mapping[key]
    if not isinstance(path, str):
        return path
    try:
        plugin_class = import_path(path)
        self.register(key, plugin_class, override=True)
        return plugin_class
    except Exception as e:
        self.register_disabled(key, e, override=True)
        return e