docs: def serialize(self):
          """Convert Entity to python dictionary."""
          # Serialize fields to a dict
          data = {}
          for field_name in self:
              value = self._values.get(field_name)
              field = self.fields.get(field_name)
              if value is not None:
                  if field.all:
                      value = [field.serialize(v) for v in value]
                  else:
                      value = field.serialize(value)
              # Skip empty fields unless field.null
              if not field.null and ((field.all and value == []) or (not field.all and value in {None, ''})):
                  continue
              data[field.name] = value
          return data