def METHOD_NAME(self, setting_id, setting_type, default):
    value = self.data.get(setting_id)
    if isinstance(value, setting_type):
        return value
    self._log_bad_value(value, setting_id)
    return default