code: def _parse_boolean(element_text, state):
      
      value = None
  
      lowered_text = element_text.lower()
      if lowered_text == 'true':
          value = True
      elif lowered_text == 'false':
          value = False
      else:
          state.raise_error(InvalidPrimitiveValue, 'Invalid boolean value "{}"'.format(element_text))
  
      return value
docs: Parse the raw XML string as a boolean value.