def _setup_advanced_theme(self, theme_name, output_dir, advanced_name):
"""<STR_LIT>"""<EOL>output_theme_dir = os.path.join(output_dir, advanced_name)<EOL>output_images_dir = os.path.join(output_theme_dir, advanced_name)<EOL>input_theme_dir = os.path.join(<EOL>utils.get_themes_directory(theme_name, self.png_support), theme_name)<EOL>input_images_dir = os.path.join(input_theme_dir, theme_name)<EOL>advanced_pkg_dir = os.path.join(utils.get_file_directory(), "<STR_LIT>")<EOL>"""<STR_LIT>"""<EOL>for directory in [output_dir, output_theme_dir]:<EOL><INDENT>utils.create_directory(directory)<EOL><DEDENT>"""<STR_LIT>"""<EOL>file_name = theme_name + "<STR_LIT>"<EOL>theme_input = os.path.join(input_theme_dir, file_name)<EOL>theme_output = os.path.join(output_theme_dir, "<STR_LIT>".format(advanced_name))<EOL>with open(theme_input, "<STR_LIT:r>") as fi, open(theme_output, "<STR_LIT:w>") as fo:<EOL><INDENT>for line in fi:<EOL><INDENT>line = line.replace(theme_name, advanced_name)<EOL>line = line.replace("<STR_LIT>", "<STR_LIT>")<EOL>line = line.replace("<STR_LIT>", "<STR_LIT>")<EOL>fo.write(line)<EOL><DEDENT><DEDENT>"""<STR_LIT>"""<EOL>theme_pkg_input = os.path.join(advanced_pkg_dir, "<STR_LIT>")<EOL>theme_pkg_output = os.path.join(output_theme_dir, "<STR_LIT>")<EOL>with open(theme_pkg_input, "<STR_LIT:r>") as fi, open(theme_pkg_output, "<STR_LIT:w>") as fo:<EOL><INDENT>for line in fi:<EOL><INDENT>fo.write(line.replace("<STR_LIT>", advanced_name))<EOL><DEDENT><DEDENT>"""<STR_LIT>"""<EOL>theme_pkg_input = os.path.join(advanced_pkg_dir, "<STR_LIT>")<EOL>theme_pkg_output = os.path.join(output_dir, "<STR_LIT>")<EOL>with open(theme_pkg_input, "<STR_LIT:r>") as fi, open(theme_pkg_output, "<STR_LIT:w>") as fo:<EOL><INDENT>for line in fi:<EOL><INDENT>fo.write(line.replace("<STR_LIT>", advanced_name))<EOL><DEDENT><DEDENT>"""<STR_LIT>"""<EOL>if os.path.exists(output_images_dir):<EOL><INDENT>rmtree(output_images_dir)<EOL><DEDENT>copytree(input_images_dir, output_images_dir)<EOL>
Setup all the files required to enable an advanced theme.

Copies all the files over and creates the required directories
if they do not exist.

:param theme_name: theme to copy the files over from
:param output_dir: output directory to place the files in