code: def serialize(self, value, entity=None, request=None):
      
  
      ret = self.from_python(value)
      self.validate(ret)
      self.run_validators(value)
      return ret
docs: Validate and serialize the value.
  
      This is the default implementation