def METHOD_NAME(
    self, key: str, tp: Union[str, Type[T], Exception], override: bool = False
) -> None:
    if not override and key in self._mapping:
        raise KeyError(f"key already in use - {key}")
    if _is_importable(key):
        raise KeyError(f"key cannot contain special characters; got {key}")
    self._mapping[key] = tp