<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _default_key_setter(self, name, subject):
 """ This method is used only when there is a custom key_setter set. Do not override this method. """

        if is_config_item(subject):
            self.add_item(name, subject)
        elif is_config_section(subject):
            self.add_section(name, subject)
        else:
            raise TypeError(
                'Section items can only be replaced with items, '
                'got {type}. To set item value use ...{name}.value = <new_value>'.format(
                    type=type(subject),
                    name=name,
                )
            )