docs: def _extract_multiple_hits(self, hits, reads_path, output_path):
          '''
          splits out regions of a read that hit the HMM. For example when two of
          same gene are identified within the same contig, The regions mapping to
          the HMM will be split out and written out to a new file as a new record.
  
          Parameters
          ----------
          hits : dict
              A dictionary where the keys are the read names, the entry for each
              is a list of lists, each containing the range within the contig
              (or read) that mapped to the HMM. e.g.:
  
              {'read1': [[3, 126], [305, 413]],
               'read2': [[1, 125]],
               ...
  
          reads_path : str
              path to reads file containing each read or contig in FASTA format to
              be opened, and split.
          output_path : str
              path to file to which split reads will be written to in FASTA
              format.
  
          Returns
          -------
          Nothing, output path is known.
          '''
  
          complement_information = {}
          try:
              reads = SeqIO.to_dict(SeqIO.parse(reads_path, "fasta"))  # open up reads as dictionary
          except:
              logging.error("Multiple sequences found with the same ID. The input sequences are either ill formated or are interleaved. \
  If you provided GraftM with an interleaved sequence file, please split them into forward and reverse reads, and provide to the the appropriate \
  flags (--forward, --reverse). Otherwise, it appears that you have provided sequences with redundant IDs. GraftM doesn't know how to \
  deal with these, so please remove/rename sequences with duplicate keys.")
              raise InterleavedFileError()
          with open(output_path, 'w') as out:
              for read_name, entry in hits.iteritems():  # For each contig
                  ranges = entry["entry"]
                  complements = entry["strand"]
                  index = 1
                  if len(ranges) > 1:  # if there are multiple hits in that contig
                      for r, c in zip(ranges, complements):  # for each of those hits
  
                          new_record = reads[read_name][r[0] - 1:r[1]]  # subset the record by the span of that hit
                          new_record.id = new_record.id + '_split_%i' % index  # give that subset record a new header
                          SeqIO.write(new_record, out, "fasta")  # and write it to output
                          index += 1  # increment the split counter
                          complement_information[new_record.id]=c
  
                  else:  # Otherwise, just write the read back to the file
                      complement_information[read_name] = entry["strand"][0] 
                      SeqIO.write(reads[read_name], out, "fasta")
          
          return complement_information