<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def write_16S_rRNA_fasta(self, org_list):

        '''
        Writes a fasta file containing 16S rRNA sequences
        for a list of Organism objects,

        The first 16S sequence found in the seq record object is used,
        since it looks like there are duplicates
        '''

        fasta = []
        for org in org_list:

            handle = open(org.genome_path, "rU")


            seq_record = SeqIO.read(handle, "genbank")

            for feat in seq_record.features:
                if feat.type == 'rRNA':
                    if '16S ribosomal' in feat.qualifiers['product'][0]:
                        start = feat.location.start.position
                        end = feat.location.end.position

                        if ((end - start) > 1400) & ((end - start) < 1700) :

                            print 'rRNA sequence extracted for', org.accession

                            fasta.append('>' + org.accession +
                                         '\n' + 
                                         str(feat.extract(seq_record.seq)) +
                                          '\n')

                            org.rRNA16S_sequence = str(feat.extract(seq_record.seq))
                            
                            break

                    
        faastring = "".join(fasta)
        filename = '16S-rRNA.fasta'
        write_fasta = open(filename, 'w')
        write_fasta.write(faastring)
        write_fasta.close()