code: def note_change(self, key, value):
          
          # If we're changing the value and we haven't done so already, note it.
          if value != self._instance[key] and key not in self._previous and key not in self._added:
              self._previous[key] = self._instance[key]
  
          # If we're setting the value back to the original value, discard the change note
          if key in self._previous and value == self._previous[key]:
              del self._previous[key]
docs: Updates change state to reflect a change to a field. Takes care of ignoring
          no-ops, reversions and takes appropriate steps if the field was previously
          deleted or added to ensure the change state purely reflects the diff since
          last reset.