code: def _writeMzmlIndexList(xmlWriter, spectrumIndexList, chromatogramIndexList):
      
      counts = 0
      if spectrumIndexList:
          counts += 1
      if chromatogramIndexList:
          counts += 1
      if counts == 0:
          return None
      #Create indexList node
      xmlIndexList = xmlWriter.element('indexList', {'count': str(counts)})
      xmlIndexList.__enter__()
      xmlWriter.write('\n')
  
      _writeIndexListElement(xmlWriter, 'spectrum', spectrumIndexList)
      _writeIndexListElement(xmlWriter, 'chromatogram', chromatogramIndexList)
  
      #Close indexList node
      xmlIndexList.__exit__(None, None, None)
      xmlWriter.write('\n')
docs: #TODO: docstring
  
      :param xmlWriter: #TODO: docstring
      :param spectrumIndexList: #TODO: docstring
      :param chromatogramIndexList: #TODO: docstring