<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):
 """ Sets the key-value pair and dumps to the preferences file. """

        if not value == None: self.prefs[key] = value
        else:                 self.prefs.pop(key)

        self.Dump()