code: def _set_state_from_serializeable_fields_and_state(self, state, klass):
          
          if _debug:
              logger.debug("restoring state for class %s", klass)
  
          for field in SerializableMixIn._get_serialize_fields(klass):
              if field in state:
                  # ensure we can set attributes. Log culprits.
                  try:
                      setattr(self, field, state.get(field))
                  except AttributeError:
                      logger.debug('field: %s', field, exc_info=True)
              else:
                  if _debug:
                      logger.debug("skipped %s, because it is not contained in state", field)
docs: set only fields from state, which are present in klass.__serialize_fields