def combine_html_pages(
    html_pages, tab_names, summary="", title="Experiment logs"
):
  """Combines multiple HTML pages into a single HTML page with tabs."""
  html_code = ""
  html_code += f"""<h2>{title}</h2>
  <p>{summary}</p>
  <p>Click on the buttons to see the detailed logs:</p>

  <div class="tab">
  """

  for tab_name in tab_names:
    html_code += (
        '<button class="tablinks" onclick="openTab(event,'
        f" '{tab_name}')\">{tab_name}</button>\n"
    )

  html_code += "</div>\n"

  for i, html_page in enumerate(html_pages):
    html_code += (
        f'<div id="{tab_names[i]}" class="tabcontent">' + html_page + "</div>\n"
    )

  return html_code
Combines multiple HTML pages into a single HTML page with tabs.
concordia/utils/html.py