<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_setting(self, key, default_value=None, value_type=str):
 """Get the setting stored at the given key. Args: key (str):
 the setting key default_value (str, optional):
 The default value, if none is found. Defaults to None. value_type (function, optional):
 The type of a setting value. Defaults to `str`. Returns: str: The value of the setting if found, default_value otherwise. """

        try:
            state_entry = self._state_view.get(
                SettingsView.setting_address(key))
        except KeyError:
            return default_value

        if state_entry is not None:
            setting = Setting()
            setting.ParseFromString(state_entry)
            for setting_entry in setting.entries:
                if setting_entry.key == key:
                    return value_type(setting_entry.value)

        return default_value