code: def wrap(self, data):
          
          for name, field in self.fields:
              try:
                  self._state[name] = field.consume(
                      self._state.get(name, None), data[name])
              except KeyError:
                  self._state[name] = None
docs: Wraps and consumes an arbitrary dictionary into the model.