def _extract_multiple_hits(self, hits, reads_path, output_path):
complement_information = {}<EOL>try:<EOL><INDENT>reads = SeqIO.to_dict(SeqIO.parse(reads_path, "<STR_LIT>"))  <EOL><DEDENT>except:<EOL><INDENT>logging.error("<STR_LIT>")<EOL>raise InterleavedFileError()<EOL><DEDENT>with open(output_path, '<STR_LIT:w>') as out:<EOL><INDENT>for read_name, entry in hits.iteritems():  <EOL><INDENT>ranges = entry["<STR_LIT>"]<EOL>complements = entry["<STR_LIT>"]<EOL>index = <NUM_LIT:1><EOL>if len(ranges) > <NUM_LIT:1>:  <EOL><INDENT>for r, c in zip(ranges, complements):  <EOL><INDENT>new_record = reads[read_name][r[<NUM_LIT:0>] - <NUM_LIT:1>:r[<NUM_LIT:1>]]  <EOL>new_record.id = new_record.id + '<STR_LIT>' % index  <EOL>SeqIO.write(new_record, out, "<STR_LIT>")  <EOL>index += <NUM_LIT:1>  <EOL>complement_information[new_record.id]=c<EOL><DEDENT><DEDENT>else:  <EOL><INDENT>complement_information[read_name] = entry["<STR_LIT>"][<NUM_LIT:0>] <EOL>SeqIO.write(reads[read_name], out, "<STR_LIT>")<EOL><DEDENT><DEDENT><DEDENT>return complement_information<EOL>
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.