class_docstr: SAX driver for the pyexpat C module.
class_docstr_tok: ["SAX","driver","for","the","pyexpat","C","module","."]
code: def setFeature(self, name, state):
      if self._parsing:
          raise SAXNotSupportedException(
              "Cannot set features while parsing"
          )
  
      if name == feature_namespaces:
          self._namespaces = state
      elif name == feature_external_ges:
          self._external_ges = state
      elif name == feature_string_interning:
          if state:
              if self._interning is None:
                  self._interning = {}
          else:
              self._interning = None
      elif name == feature_validation:
          if state:
              raise SAXNotSupportedException(
                  "expat does not support validation"
              )
      elif name == feature_external_pes:
          if state:
              raise SAXNotSupportedException(
                  "expat does not read external parameter entities"
              )
      elif name == feature_namespace_prefixes:
          if state:
              raise SAXNotSupportedException(
                  "expat does not report namespace prefixes"
              )
      else:
          raise SAXNotRecognizedException(
              "Feature '%s' not recognized" % name
          )
  
imports: from xml.sax._exceptions import *
  from xml.sax.handler import feature_validation, feature_namespaces
  from xml.sax.handler import feature_namespace_prefixes
  from xml.sax.handler import feature_external_ges, feature_external_pes
  from xml.sax.handler import feature_string_interning
  from xml.sax.handler import property_xml_string, property_interning_dict
  from xml.sax import xmlreader, saxutils, handler
label_desc: Use image node_id 6 for calling the ExpatParser obj's underlying member method code with example usage: obj.setFeature(name, state) without return types