def write_entrez2gene(file_path, entrez2gene, logger):
with misc.smart_open_write(file_path, mode='<STR_LIT:wb>') as ofh:<EOL><INDENT>writer = csv.writer(ofh, dialect='<STR_LIT>',<EOL>lineterminator=os.linesep)<EOL>for k in sorted(entrez2gene.keys(), key=lambda x: int(x)):<EOL><INDENT>writer.writerow([k, entrez2gene[k]])<EOL><DEDENT><DEDENT>logger.info('<STR_LIT>', file_path)<EOL>
Writes Entrez ID -> gene symbol mapping to a tab-delimited text file.

    Parameters
    ----------
    file_path: str
        The path of the output file.
    entrez2gene: dict
        The mapping of Entrez IDs to gene symbols.

    Returns
    -------
    None