def METHOD_NAME(assemblies=None, ofh=None):
    """
    Utility function to write a BED file from a list() of biothings.Assembly objects.
    No headers are used so the output is compatible with other tools like bedToBigBed.
    References:
      BED format descriptions:
      - http://genome.ucsc.edu/FAQ/FAQformat#format1
      - http://bedtools.readthedocs.io/en/latest/content/general-usage.html
      bedToBigBed:
      - http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/bedToBigBed
      Representing gene models in BED:
      - http://transvar.org/6111/gene_models.pdf
    """
    if type(ofh).__name__ != 'TextIOWrapper':
        ofh = sys.stdout #TextIOWrapper
    for assembly_id in assemblies:
        current_assembly = assemblies[assembly_id]
        for gene in sorted(assemblies[assembly_id].genes()):
            rnas_found = 0
            mRNAs = gene.mRNAs()
            for mRNA in mRNAs:
                mRNA_loc = mRNA.location_on(current_assembly)
                rnas_found += 1
                if rnas_found > 1:
                    gene.remove_mRNA(mRNA)
                    print("INFO: splitting mRNA off gene {0}".format(gene.id))
                    new_gene = biocode.things.Gene(id="{0}_{1}".format(gene.id, rnas_found))
                    new_gene.locate_on(target=current_assembly, fmin=mRNA_loc.fmin, fmax=mRNA_loc.fmax, strand=mRNA_loc.strand)
                    new_gene.add_RNA(mRNA)
                    print_biogene(gene=new_gene, fh=ofh)
            if len(mRNAs) > 1:
                gene_loc = gene.location_on(current_assembly)
                mRNA_loc = mRNAs[0].location_on(current_assembly)
                gene_loc.fmin = mRNA_loc.fmin
                gene_loc.fmax = mRNA_loc.fmax
                gene_loc.strand = mRNA_loc.strand
            print_biogene(gene=gene, fh=ofh)