Get a config variable. If a variable is not set, a resolver is not
        set, and no default is given
        :class:`~haps.exceptions.UnknownConfigVariable` is raised.

        :param var_name: Name of variable
        :param default: Default value
        :return: Value of config variable

def get_var(self, var_name: str, default: Optional[Any] = _NONE) -> Any:
        """
        Get a config variable. If a variable is not set, a resolver is not
        set, and no default is given
        :class:`~haps.exceptions.UnknownConfigVariable` is raised.

        :param var_name: Name of variable
        :param default: Default value
        :return: Value of config variable
        """
        try:
            return self.cache[var_name]
        except KeyError:
            try:
                var = self._resolve_var(var_name)
            except UnknownConfigVariable as e:
                if default is not _NONE:
                    if callable(default):
                        return default()
                    else:
                        return default
                else:
                    raise e
            else:
                self.cache[var_name] = var
                return var