def METHOD_NAME():
    parser = argparse.ArgumentParser( description='Converts CEGMA GFF output to spec-legal GFF3')
    # output file to be written
    parser.add_argument('-i', '--input_file', type=str, required=True, help='Path to an input file to parse' )
    parser.add_argument('-o', '--output_file', type=str, required=True, help='Path to an output file to be created' )
    args = parser.parse_args()
    fout = open(args.output_file, 'w')
    fout.write("##gff-version 3\n")
    assemblies = dict()
    current_assembly = None
    current_gene = None
    current_mRNA = None
    current_gene_fmin = None
    current_gene_fmax = None
    current_gene_strand = None
    next_id_nums = {'gene':1, 'mRNA':1, 'CDS':1, 'exon':1}
    exon_column_types = ['First', 'Internal', 'Terminal', 'Single']
    for line in open(args.input_file, 'r'):
        if line.startswith('#'):
            continue
        cols = line.split("\t")
        if len(cols) != 9:
            continue
        mol_id = cols[0]
        feat_type = cols[2]
        feat_fmin = int(cols[3]) - 1
        feat_fmax = int(cols[4])
        if feat_type == 'Single' or feat_type == 'First':
            # If there's an existing gene already, print it out
            if current_gene is not None:
                current_gene.locate_on( target=current_assembly, fmin=current_gene_fmin, fmax=current_gene_fmax, strand=current_gene_strand )
                current_mRNA.locate_on( target=current_assembly, fmin=current_gene_fmin, fmax=current_gene_fmax, strand=current_gene_strand )
                #current_gene.print_as(format='text')
                current_gene.print_as(fh=fout, source='cegma', format='gff3')
            # initialize this assembly if we haven't seen it yet
            if mol_id not in assemblies:
                assemblies[mol_id] = things.Assembly(id=mol_id)
            current_assembly = assemblies[mol_id]
            feat_id = "cegma.gene.{0}".format(next_id_nums['gene'])
            next_id_nums['gene'] += 1
            gene = things.Gene(id=feat_id)
            current_gene = gene
            current_gene_strand = cols[6]
            current_gene_fmin = feat_fmin
            current_gene_fmax = feat_fmax
            mRNA_id = "cegma.mRNA.{0}".format(next_id_nums['mRNA'])
            next_id_nums['mRNA'] += 1
            mRNA = things.mRNA(id=mRNA_id, parent=gene)
            gene.add_mRNA(mRNA)
            current_mRNA = mRNA
        # CEGMA versions < 2.5 had two rows for each exon.  We don't need to process both of them, so
        #  we skip the Exon one because its phase information is incorrect.
        if feat_type in exon_column_types:
            CDS_id = "cegma.CDS.{0}".format(next_id_nums['CDS'])
            next_id_nums['CDS'] += 1
            CDS = things.CDS(id=CDS_id, parent=current_mRNA)
            CDS.locate_on( target=current_assembly, fmin=feat_fmin, fmax=feat_fmax, strand=cols[6], phase=cols[7] )
            current_mRNA.add_CDS(CDS)
            exon_id = "cegma.exon.{0}".format(next_id_nums['exon'])
            next_id_nums['exon'] += 1
            exon = things.Exon(id=exon_id, parent=current_mRNA)
            exon.locate_on( target=current_assembly, fmin=feat_fmin, fmax=feat_fmax, strand=cols[6] )
            mRNA.add_exon(exon)
            if feat_fmin < current_gene_fmin:
                current_gene_fmin = feat_fmin
            if feat_fmax > current_gene_fmax:
                current_gene_fmax = feat_fmax
    # don't forget the last gene
    if current_gene is not None:
        current_gene.locate_on( target=current_assembly, fmin=current_gene_fmin, fmax=current_gene_fmax, strand=current_gene_strand )
        current_mRNA.locate_on( target=current_assembly, fmin=current_gene_fmin, fmax=current_gene_fmax, strand=current_gene_strand )
        current_gene.print_as(fh=fout, source='cegma', format='gff3')