def assemble_experiment_temp_dir(config):
app_id = config.get("<STR_LIT:id>")<EOL>dst = os.path.join(tempfile.mkdtemp(), app_id)<EOL>shutil.copytree(os.getcwd(), dst, ignore=exclusion_policy())<EOL>config.write(filter_sensitive=True, directory=dst)<EOL>with open(os.path.join(dst, "<STR_LIT>"), "<STR_LIT:w>") as file:<EOL><INDENT>file.write(app_id)<EOL><DEDENT>dallinger_root = dallinger_package_path()<EOL>ensure_directory(os.path.join(dst, "<STR_LIT>", "<STR_LIT>"))<EOL>ensure_directory(os.path.join(dst, "<STR_LIT>", "<STR_LIT>"))<EOL>frontend_files = [<EOL>os.path.join("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>"),<EOL>os.path.join("<STR_LIT>", "<STR_LIT>"),<EOL>]<EOL>frontend_dirs = [os.path.join("<STR_LIT>", "<STR_LIT>")]<EOL>for filename in frontend_files:<EOL><INDENT>src = os.path.join(dallinger_root, "<STR_LIT>", filename)<EOL>dst_filepath = os.path.join(dst, filename)<EOL>if not os.path.exists(dst_filepath):<EOL><INDENT>shutil.copy(src, dst_filepath)<EOL><DEDENT><DEDENT>for filename in frontend_dirs:<EOL><INDENT>src = os.path.join(dallinger_root, "<STR_LIT>", filename)<EOL>dst_filepath = os.path.join(dst, filename)<EOL>if not os.path.exists(dst_filepath):<EOL><INDENT>shutil.copytree(src, dst_filepath)<EOL><DEDENT><DEDENT>heroku_files = ["<STR_LIT>", "<STR_LIT>"]<EOL>for filename in heroku_files:<EOL><INDENT>src = os.path.join(dallinger_root, "<STR_LIT>", filename)<EOL>shutil.copy(src, os.path.join(dst, filename))<EOL><DEDENT>if not config.get("<STR_LIT>"):<EOL><INDENT>src = os.path.join(dallinger_root, "<STR_LIT>", "<STR_LIT>")<EOL>shutil.copy(src, os.path.join(dst, "<STR_LIT>"))<EOL><DEDENT>return dst<EOL>
Create a temp directory from which to run an experiment.
    The new directory will include:
    - Copies of custom experiment files which don't match the exclusion policy
    - Templates and static resources from Dallinger
    - An export of the loaded configuration
    - Heroku-specific files (Procile, runtime.txt) from Dallinger

    Assumes the experiment root directory is the current working directory.

    Returns the absolute path of the new directory.