code: def _requirement_element(self, parent_element, req_data):
          
          req_data = self._transform_result(req_data)
          if not req_data:
              return
  
          title = req_data.get("title")
          if not title:
              logger.warning("Skipping requirement, title is missing")
              return
          req_id = req_data.get("id")
  
          if not self._check_lookup_prop(req_id):
              logger.warning(
                  "Skipping requirement `%s`, data missing for selected lookup method", title
              )
              return
  
          attrs, custom_fields = self._classify_data(req_data)
          attrs, custom_fields = self._fill_defaults(attrs, custom_fields)
  
          # For testing purposes, the order of fields in resulting XML
          # needs to be always the same.
          attrs = OrderedDict(sorted(attrs.items()))
          custom_fields = OrderedDict(sorted(custom_fields.items()))
  
          requirement = etree.SubElement(parent_element, "requirement", attrs)
  
          title_el = etree.SubElement(requirement, "title")
          title_el.text = title
  
          description = req_data.get("description")
          if description:
              description_el = etree.SubElement(requirement, "description")
              description_el.text = description
  
          self._fill_custom_fields(requirement, custom_fields)
docs: Adds requirement XML element.