<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(self, key, value):
 """ Set a value in the component. Arguments: key - the key to set value - the new value """

        if self._component.get(key, raw=True) != value:
            self._component[key] = value
            self._main_config.dirty = True