def main(args=None):
vinfo = sys.version_info<EOL>if not (vinfo >= (<NUM_LIT:2>, <NUM_LIT:7>)):<EOL><INDENT>raise SystemError('<STR_LIT>'<EOL>'<STR_LIT>' % (vinfo.major, vinfo.minor))<EOL><DEDENT>if args is None:<EOL><INDENT>parser = get_argument_parser()<EOL>args = parser.parse_args()<EOL><DEDENT>gene2acc_file = args.gene2acc_file<EOL>output_file = args.output_file<EOL>log_file = args.log_file<EOL>quiet = args.quiet<EOL>verbose = args.verbose<EOL>log_stream = sys.stdout<EOL>if output_file == '<STR_LIT:->':<EOL><INDENT>log_stream = sys.stderr<EOL><DEDENT>logger = misc.get_logger(log_stream=log_stream, log_file=log_file,<EOL>quiet=quiet, verbose=verbose)<EOL>entrez2gene = read_gene2acc(gene2acc_file, logger)<EOL>write_entrez2gene(output_file, entrez2gene, logger)<EOL>return <NUM_LIT:0><EOL>
Extracts Entrez ID -> gene symbol mapping and writes it to a text file.

    Parameters
    ----------
    args: argparse.Namespace object, optional
        The argument values. If not specified, the values will be obtained by
        parsing the command line arguments using the `argparse` module.

    Returns
    -------
    int
        Exit code (0 if no error occurred).

    Raises
    ------
    SystemError
        If the version of the Python interpreter is not >= 2.7.