def METHOD_NAME(self, widget):
    text = self._format
    if self.__error is not None:
        text = self.__error
    else:
        try:
            text = formatStringBuilder(self._format, self.__data)
        except KeyError:
            text = "KeyError"
    return text