code: def __iter_read_spectrum_meta(self):
          
          mz_group = int_group = None
          slist = None
          elem_iterator = self.iterparse(self.filename, events=("start", "end"))
  
          if sys.version_info > (3,):
              _, self.root = next(elem_iterator)
          else:
              _, self.root = elem_iterator.next()
  
          for event, elem in elem_iterator:
              if elem.tag == self.sl + "spectrumList" and event == "start":
                  slist = elem
              elif elem.tag == self.sl + "spectrum" and event == "end":
                  self.__process_spectrum(elem)
                  slist.remove(elem)
              elif elem.tag == self.sl + "referenceableParamGroup" and event == "end":
                  for param in elem:
                      if param.attrib["name"] == "m/z array":
                          self.mzGroupId = elem.attrib['id']
                          mz_group = elem
                      elif param.attrib["name"] == "intensity array":
                          self.intGroupId = elem.attrib['id']
                          int_group = elem
          self.__assign_precision(int_group, mz_group)
          self.__fix_offsets()
docs: This method should only be called by __init__. Reads the data formats, coordinates and offsets from
          the .imzML file and initializes the respective attributes. While traversing the XML tree, the per-spectrum
          metadata is pruned, i.e. the <spectrumList> element(s) are left behind empty.
  
          Supported accession values for the number formats: "MS:1000521", "MS:1000523", "IMS:1000141" or
          "IMS:1000142". The string values are "32-bit float", "64-bit float", "32-bit integer", "64-bit integer".