<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setdefaults(self, from_qs):
 """ sets values from a QuickSettings object, only keeping values that are not already defined on the main object """

        for k in from_qs.keys():
            from_value = from_qs[k]
            fv_is_qs = isinstance(from_value, QuickSettings)
            self_value = self.get(k, None)
            sv_is_qs = isinstance(self_value, QuickSettings)
            if self_value is None:
                # we don't have a value, so just take the value of the from
                # object
                self[k] = from_value
            elif sv_is_qs and fv_is_qs:
                self_value.setdefaults(from_value)