docs: def serialize(
              self,
              value,  # type: Any
              state  # type: _ProcessorState
      ):
          # type: (...) -> ET.Element
          """Serialize the value to a new element and return the element."""
          if not value and self.required:
              state.raise_error(
                  MissingValue, 'Missing required aggregate "{}"'.format(self.element_path)
              )
  
          start_element, end_element = _element_path_create_new(self.element_path)
          self._serialize(end_element, value, state)
          return start_element