docs: def _parse_attribute(
              self,
              element,  # type: ET.Element
              attribute,  # type: Text
              state  # type: _ProcessorState
      ):
          # type: (...) -> Any
          """Parse the primitive value within the XML element's attribute."""
          parsed_value = self._default
          attribute_value = element.get(attribute, None)
  
          if attribute_value is not None:
              parsed_value = self._parser_func(attribute_value, state)
          elif self.required:
              state.raise_error(
                  MissingValue, 'Missing required attribute "{}" on element "{}"'.format(
                      self._attribute, element.tag
                  )
              )
  
          return parsed_value