class_docstr: Convert nested  data structure into html table
  
  data example:
  {
       "headers": ['Node', 'Inputs', 'Outputs'],
       "data": [{
           "headers": ['a', 'b'],
            "data": [1, 2]
        },{
            "headers": ['a', 'b'],
            "data": [{...}]
        }]
   }
class_docstr_tok: ["Convert","nested","data","structure","into","html","table","data","example",":","{","``","headers","''",":","[","'Node","'",",","'Inputs","'",",","'Outputs","'","]",",","``","data","''",":","[","{","``","headers","''",":","[","'","a","'",",","'","b","'","]",",","``","data","''",":","[","1",",","2","]","}",",","{","``","headers","''",":","[","'","a","'",",","'","b","'","]",",","``","data","''",":","[","{","...","}","]","}","]","}"]
docstr: Convert two dimensional data structure into html table
  
  Args:
      data (List)
      headers (Iterable[str]): The names of columns defined by user.
  Returns:
      str: The table in html format.
docstr_tok: ["Convert","two","dimensional","data","structure","into","html","table","Args",":","data","(","List",")","headers","(","Iterable","[","str","]",")",":","The","names","of","columns","defined","by","user",".","Returns",":","str",":","The","table","in","html","format","."]
code: def to_html_table(data, headers):
      """Convert two dimensional data structure into html table
  
      Args:
          data (List)
          headers (Iterable[str]): The names of columns defined by user.
      Returns:
          str: The table in html format.
      """
      tb_style = 'style="border-collapse: collapse;"'
      th_style = (
          'style="text-align: center; font-size: 130%; border: none;"'
      )
      trs = []
      trs.append(
          "<tr>"
          + " ".join(
              ["<th " + th_style + ">" + x + "</th>" for x in headers]
          )
          + "</tr>"
      )
  
      for r in data:
          tds = []
          for x in r:
              if isinstance(x, dict) and "headers" in x and "data" in x:
                  tds.append(
                      "<td>"
                      + NestedHTMLTable.to_html_table(
                          x["data"], x["headers"]
                      )
                      + "</td>"
                  )
              else:
                  tds.append(_to_html_td(x))
  
          trs.append("<tr>" + "".join(tds) + "</tr>")
      return "<table " + tb_style + ">" + "\n".join(trs) + "</table>"
  
file_path: towhee/towhee/utils/html_table.py
imports: import numpy
  from towhee.utils.thirdparty.ipython_utils import display, HTML
  from towhee.types import Image, VideoFrame, AudioFrame
label_desc: Use image node_id 2 for calling the NestedHTMLTable obj's underlying member method code with example usage: obj.to_html_table(data, headers) and returns: unknown