code: def html_table_from_query(rows: Iterable[Iterable[Optional[str]]],
                            descriptions: Iterable[Optional[str]]) -> str:
      
      html = u"<table>\n"
  
      # Header row
      html += u"<tr>"
      for x in descriptions:
          if x is None:
              x = u""
          html += u"<th>{}</th>".format(webify(x))
      html += u"</tr>\n"
  
      # Data rows
      for row in rows:
          html += u"<tr>"
          for x in row:
              if x is None:
                  x = u""
              html += u"<td>{}</td>".format(webify(x))
          html += u"<tr>\n"
  
      html += u"</table>\n"
      return html
docs: Converts rows from an SQL query result to an HTML table.
      Suitable for processing output from the defunct function
      ``rnc_db.fetchall_with_fieldnames(sql)``.