code: def writePathogenIndex(self, fp):
          
          print('\n'.join(
              '%d %s' % (index, name) for (index, name) in
              sorted((index, name) for (name, index) in self._pathogens.items())
          ), file=fp)
docs: Write a file of pathogen indices and names, sorted by index.
  
          @param fp: A file-like object, opened for writing.