class_docstr: Class to parse an XML string into a CIFTI-2 header object
class_docstr_tok: ["Class","to","parse","an","XML","string","into","a","CIFTI-2","header","object"]
code: def EndElementHandler(self, name):
      self.flush_chardata()
      if self.verbose > 0:
          print("End element:\n\t", repr(name))
  
      if name == "CIFTI":
          # remove last element of the list
          self.fsm_state.pop()
          self.struct_state.pop()
  
      elif name == "Matrix":
          self.fsm_state.pop()
          self.struct_state.pop()
  
      elif name == "MetaData":
          self.fsm_state.pop()
          meta = self.struct_state.pop()
          parent = self.struct_state[-1]
          parent.metadata = meta
  
      elif name == "MD":
          self.fsm_state.pop()
          pair = self.struct_state.pop()
          meta = self.struct_state[-1]
          meta[pair[0]] = pair[1]
  
      elif name == "Name":
          self.write_to = None
  
      elif name == "Value":
          self.write_to = None
  
      elif name == "MatrixIndicesMap":
          self.fsm_state.pop()
          self.struct_state.pop()
  
      elif name == "NamedMap":
          self.fsm_state.pop()
          self.struct_state.pop()
  
      elif name == "LabelTable":
          self.fsm_state.pop()
          self.struct_state.pop()
  
      elif name == "Label":
          self.fsm_state.pop()
          label = self.struct_state.pop()
          lata = self.struct_state[-1]
          lata.append(label)
          self.write_to = None
  
      elif name == "MapName":
          self.fsm_state.pop()
          self.write_to = None
  
      elif name == "Parcel":
          self.fsm_state.pop()
          self.struct_state.pop()
  
      elif name == "Vertices":
          self.fsm_state.pop()
          self.struct_state.pop()
          self.write_to = None
  
      elif name == "VoxelIndicesIJK":
          self.write_to = None
  
      elif name == "Volume":
          self.fsm_state.pop()
          self.struct_state.pop()
  
      elif name == "TransformationMatrixVoxelIndicesIJKtoXYZ":
          self.fsm_state.pop()
          self.struct_state.pop()
          self.write_to = None
  
      elif name == "BrainModel":
          self.fsm_state.pop()
          self.struct_state.pop()
  
      elif name == "VertexIndices":
          self.fsm_state.pop()
          self.struct_state.pop()
          self.write_to = None
  
imports: from io import BytesIO
  import numpy
  from packaging.version import Version, parse
  from ..None import xmlutils
  from ..batteryrunners import Report
  from ..nifti1 import Nifti1Extension, extension_codes, intent_codes
  from ..nifti2 import Nifti2Header, Nifti2Image
  from ..spatialimages import HeaderDataError
  from .cifti2 import CIFTI_BRAIN_STRUCTURES, CIFTI_MODEL_TYPES, Cifti2BrainModel, Cifti2Header, Cifti2HeaderError, Cifti2Label, Cifti2LabelTable, Cifti2Matrix, Cifti2MatrixIndicesMap, Cifti2MetaData, Cifti2NamedMap, Cifti2Parcel, Cifti2Surface, Cifti2TransformationMatrixVoxelIndicesIJKtoXYZ, Cifti2VertexIndices, Cifti2Vertices, Cifti2Volume, Cifti2VoxelIndicesIJK, _underscore
label_desc: Use image node_id 3 for calling the Cifti2Parser obj's underlying member method code with example usage: obj.EndElementHandler(name) without return types