code: def coercer(self, dataSets):
          def makeSetter(identifier, values):
              def setter(defaultObject):
                  self._idsToObjects[identifier] = defaultObject
                  self._lastValues[identifier] = values
              return setter
          created = self._coerceAll(self._extractCreations(dataSets))
          edited = self._coerceAll(self._extractEdits(dataSets))
          coerceDeferred = gatherResults([created, edited])
          def cbCoerced((created, edited)):
              receivedIdentifiers = set()
              createObjects = []
              for (identifier, dataSet) in created:
                  receivedIdentifiers.add(identifier)
                  createObjects.append(
                      CreateObject(dataSet, makeSetter(identifier, dataSet)))
              editObjects = []
              for (identifier, dataSet) in edited:
                  receivedIdentifiers.add(identifier)
                  lastValues = self._lastValues[identifier]
                  if dataSet != lastValues:
                      modelObject = self._objectFromID(identifier)
                      editObjects.append(EditObject(modelObject, dataSet))
                      self._lastValues[identifier] = dataSet
              deleted = []
              for identifier in set(self._idsToObjects) - receivedIdentifiers:
                  existing = self._objectFromID(identifier)
                  if existing is not self._NO_OBJECT_MARKER:
                      deleted.append(existing)
                  self._idsToObjects.pop(identifier)
              return ListChanges(createObjects, editObjects, deleted)
          coerceDeferred.addCallback(cbCoerced)
          return coerceDeferred