from typing import Any
from typing import Dict


def get_gene_list(mongo_reader: Any, database: str = "ensembl_90_37") -> Dict[str, str]:
    """
    get the list of genes from the mongo database, to translated ensg ids to symbols.

    Args:
        mongo_reader: the mongo wrapper
        database: database name to use.

    """

    genes = mongo_reader.find_as_cursor(database, "symbol_by_ensg", query={})
    gene_symbols = {}
    for symbol_gene in genes:
        for symbol in symbol_gene["symbols"]:
            gene_symbols[symbol_gene["_id"]] = symbol
    return gene_symbols