def get_example_html(json_example):
  """Get an HTML string for this json example."""
  annotations = json_example["sentence_annotations"]
  table_html = ""
  final_sentences = []

  table_page_title = json_example["table_page_title"]
  table_section_title = json_example["table_section_title"]
  table_section_text = json_example["table_section_text"]
  highlighted_cells = json_example["highlighted_cells"]
  table_html = get_table_html(json_example["table"], highlighted_cells)

  if not table_section_text:
    table_section_text = "<i> None </i>"

  for annotation in annotations:
    final_sentences.append(annotation["final_sentence"])

  html_header = get_html_header(table_page_title)
  all_final_sentences = "<h3>Sentence(s)</h3>" + "<br> ".join(final_sentences)

  html_str = (
      "%s <b>Section Title</b>: %s <br><b>Table Section Text</b>: %s <br> %s "
      "<br> %s </body></html>" %
      (html_header, table_section_title, table_section_text, table_html,
       all_final_sentences))

  return html_str
Get an HTML string for this json example.
language/totto/table_to_text_html_utils.py