def save(self, path, verbose=False):
path = os.path.realpath(path)<EOL>if os.path.exists(path):<EOL><INDENT>if self.load_path and self.load_path == path:<EOL><INDENT>if verbose:<EOL><INDENT>print("<STR_LIT>")<EOL><DEDENT>for context_name in self.context_names:<EOL><INDENT>self.context(context_name)  <EOL><DEDENT>shutil.rmtree(path)<EOL><DEDENT>else:<EOL><INDENT>raise SuiteError("<STR_LIT>" % path)<EOL><DEDENT><DEDENT>contexts_path = os.path.join(path, "<STR_LIT>")<EOL>os.makedirs(contexts_path)<EOL>data = self.to_dict()<EOL>filepath = os.path.join(path, "<STR_LIT>")<EOL>with open(filepath, "<STR_LIT:w>") as f:<EOL><INDENT>f.write(dump_yaml(data))<EOL><DEDENT>for context_name in self.context_names:<EOL><INDENT>context = self.context(context_name)<EOL>context._set_parent_suite(path, context_name)<EOL>filepath = self._context_path(context_name, path)<EOL>if verbose:<EOL><INDENT>print("<STR_LIT>" % filepath)<EOL><DEDENT>context.save(filepath)<EOL><DEDENT>tools_path = os.path.join(path, "<STR_LIT>")<EOL>os.makedirs(tools_path)<EOL>if verbose:<EOL><INDENT>print("<STR_LIT>" % tools_path)<EOL><DEDENT>tools = self.get_tools()<EOL>for tool_alias, d in tools.items():<EOL><INDENT>tool_name = d["<STR_LIT>"]<EOL>context_name = d["<STR_LIT>"]<EOL>data = self._context(context_name)<EOL>prefix_char = data.get("<STR_LIT>")<EOL>if verbose:<EOL><INDENT>print(("<STR_LIT>"<EOL>% (tool_alias, tool_name, context_name)))<EOL><DEDENT>filepath = os.path.join(tools_path, tool_alias)<EOL>create_forwarding_script(filepath,<EOL>module="<STR_LIT>",<EOL>func_name="<STR_LIT>",<EOL>context_name=context_name,<EOL>tool_name=tool_name,<EOL>prefix_char=prefix_char)<EOL><DEDENT>
Save the suite to disk.

        Args:
            path (str): Path to save the suite to. If a suite is already saved
                at `path`, then it will be overwritten. Otherwise, if `path`
                exists, an error is raised.