def METHOD_NAME(self, key: str, *, default: bool = None) -> bool:
    """
    Return the bool referred to by the given key if it exists, or the default.
    Implements :meth:`AbstractConfig.get_bool`.
    """
    res = self.__raw_get(key)
    if res is None:
        return default  # type: ignore # Yes it could be None, but we're _assuming_ that people gave us a default
    elif not isinstance(res, bool):
        raise ValueError(f'__raw_get returned unexpected type {type(res)=} {res!r}')
    return res