def combine_sections(sections):
PLUGINS_TO_COMBINE = {<EOL>'<STR_LIT>': ('<STR_LIT>', '<STR_LIT>', True),<EOL>'<STR_LIT>': ('<STR_LIT>', '<STR_LIT>', False)<EOL>}<EOL>plugins = {}<EOL>ready_sections = []<EOL>for section in sections:<EOL><INDENT>if section.plugin in PLUGINS_TO_COMBINE.keys():<EOL><INDENT>try:<EOL><INDENT>plugins[section.plugin].append(section)<EOL><DEDENT>except KeyError:<EOL><INDENT>plugins[section.plugin] = [section]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>ready_sections.append(section)<EOL><DEDENT><DEDENT>for plugin_name, _sections in plugins.items():<EOL><INDENT>if isinstance(_sections, list):<EOL><INDENT>parent_name, child_name, is_list = PLUGINS_TO_COMBINE[plugin_name]<EOL>ready_sections.append(Section.from_multiple(_sections, parent_name, child_name, is_list))<EOL><DEDENT><DEDENT>return ready_sections<EOL>
:type sections: list of Section
:rtype: list of Section