def heatmap(genes_by_samples_matrix, sample_attributes, title='<STR_LIT>', scripts_mode="<STR_LIT>", data_mode="<STR_LIT>",<EOL>organism="<STR_LIT>", separate_zscore_by=["<STR_LIT>"],<EOL>output_dir="<STR_LIT:.>", filename="<STR_LIT>", version=this_version):
output_dir = Path(output_dir)<EOL>output_dir.mkdir(exist_ok=True, parents=True)<EOL>_verify_sample_by_genes_matrix(genes_by_samples_matrix)<EOL>_verify_sample_attributes(genes_by_samples_matrix, sample_attributes)<EOL>genes_by_samples_matrix = genes_by_samples_matrix.round(<NUM_LIT:2>)<EOL>matrix = f"<STR_LIT>"<EOL>classes = f"<STR_LIT>"<EOL>data_block = _data_block(data_mode, [('<STR_LIT>', matrix), ('<STR_LIT>', classes)], output_dir, organism=organism)<EOL>scripts = third_party_scripts + [CDN_url(version)+"<STR_LIT>", CDN_url(version)+"<STR_LIT>", CDN_url(version)+"<STR_LIT>"]<EOL>scripts_block = _scripts_block(scripts, scripts_mode, output_dir)<EOL>html = templateEnv.get_template('<STR_LIT>').render(title=title, scripts_block=scripts_block+'<STR_LIT:\n>'+data_block, separate_zscore_by=separate_zscore_by)<EOL>(output_dir / filename).write_text(html)<EOL>return (output_dir / filename).resolve()<EOL>
Arguments:
    genes_by_samples_matrix (pandas.DataFrame): dataframe indexed by genes, columns are samples
    sample_attributes (pandas.DataFrame): dataframe indexed by samples, columns are sample attributes (e.g. classes)
    title (str): The title of the plot (to be embedded in the html).
    scripts_mode (str): Choose from [`"CDN"`, `"directory"`, `"inline"`]:

        - `"CDN"` compiles a single HTML page with links to scripts hosted on a CDN,

        - `"directory"` compiles a directory with all scripts locally cached,

        - `"inline"` compiles a single HTML file with all scripts/styles inlined.

    data_mode (str): Choose from ["directory", "inline"]:

        - "directory" compiles a directory with all data locally cached,

        - "inline" compiles a single HTML file with all data inlined.

    organism (str): `"human"` or `"mouse"`
    separate_zscore_by (list):
    output_dir (str): the directory in which to output the file
    filename (str): the filename of the output file
    version (str): the version of the javascripts to use.
        Leave the default to pin the version, or choose "latest" to get updates,
        or choose part of the version string to get minor updates.
Returns:
    Path: The filepath which the html was outputted to.