<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _set_formatter(self):
 """ Inspects config and sets the name of the formatter to either "json" or "text" as instance attr. If not present in config, default is "text" """

        if hasattr(self._config, "formatter") and self._config.formatter == "json":
            self._formatter = "json"
        else:
            self._formatter = "text"