class_docstr: Convert nested  data structure to tabulate
  
  data example:
  {
       "headers": ['Node', 'Inputs', 'Outputs'],
       "data": [{
           "headers": ['a', 'b'],
            "data": [1, 2]
        },{
            "headers": ['a', 'b'],
            "data": [{...}]
        }]
   }
class_docstr_tok: ["Convert","nested","data","structure","to","tabulate","data","example",":","{","``","headers","''",":","[","'Node","'",",","'Inputs","'",",","'Outputs","'","]",",","``","data","''",":","[","{","``","headers","''",":","[","'","a","'",",","'","b","'","]",",","``","data","''",":","[","1",",","2","]","}",",","{","``","headers","''",":","[","'","a","'",",","'","b","'","]",",","``","data","''",":","[","{","...","}","]","}","]","}"]
docstr: Convert two dimensional data structure into tabulate
  
  Args:
      data (List)
      headers (Iterable[str]): The names of columns defined by user.
  
  Returns:
      str: tabulate str
docstr_tok: ["Convert","two","dimensional","data","structure","into","tabulate","Args",":","data","(","List",")","headers","(","Iterable","[","str","]",")",":","The","names","of","columns","defined","by","user",".","Returns",":","str",":","tabulate","str"]
code: def to_tabulate(data, headers):
      """Convert two dimensional data structure into tabulate
  
      Args:
          data (List)
          headers (Iterable[str]): The names of columns defined by user.
  
      Returns:
          str: tabulate str
      """
      tb_contents = []
      for r in data:
          cells = []
          for x in r:
              if isinstance(x, dict) and "headers" in x and "data" in x:
                  cells.append(
                      NestedConsoleTable.to_tabulate(
                          x["data"], x["headers"]
                      )
                  )
              else:
                  cells.append(_to_plain_cell(x))
          tb_contents.append(cells)
      return tabulate(tb_contents, headers=headers, tablefmt="grid")
  
file_path: towhee/towhee/utils/console_table.py
imports: import numpy
  from tabulate import tabulate
  from towhee.types import Image, VideoFrame, AudioFrame
label_desc: Use image node_id 2 for calling the NestedConsoleTable obj's underlying member method code with example usage: obj.to_tabulate(data, headers) and returns: tabulate