class_docstr: Table with adaptive width and height
  
  Args:
      colors(list[str]) : Text colors
      aligns(list[str]) : Text alignments
      widths(list[str]) : Text widths
  
  Examples:
      .. code-block:: python
  
          table = Table(widths=[12, 20])
          table.append('name', 'PaddleHub')
          table.append('version', '2.0.0')
          table.append(
              'description',
              'PaddleHub is a pretrainied model application tool under the PaddlePaddle')
          table.append('author')
  
          print(table)
  
          # the result is
          # +------------+--------------------+
          # |name        |PaddleHub           |
          # +------------+--------------------+
          # |version     |2.0.0               |
          # +------------+--------------------+
          # |description |PaddleHub is a pretr|
          # |            |ainied model applica|
          # |            |tion tool under the |
          # |            |PaddlePaddle        |
          # +------------+--------------------+
          # |author      |                    |
          # +------------+--------------------+
class_docstr_tok: ["Table","with","adaptive","width","and","height","Args",":","colors","(","list","[","str","]",")",":","Text","colors","aligns","(","list","[","str","]",")",":","Text","alignments","widths","(","list","[","str","]",")",":","Text","widths","Examples",":","..","code-block",":",":","python","table","=","Table","(","widths=","[","12",",","20","]",")","table.append","(","'name","'",",","'PaddleHub","'",")","table.append","(","'version","'",",","'","2.0.0","'",")","table.append","(","'description","'",",","'PaddleHub","is","a","pretrainied","model","application","tool","under","the","PaddlePaddle","'",")","table.append","(","'author","'",")","print","(","table",")","#","the","result","is","#","+","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","+","#","|name","|PaddleHub","|","#","+","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","+","#","|version","|2.0.0","|","#","+","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","+","#","|description","|PaddleHub","is","a","pretr|","#","|","|ainied","model","applica|","#","|","|tion","tool","under","the","|","#","|","|PaddlePaddle","|","#","+","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","+","#","|author","|","|","#","+","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","+"]
docstr: Add a row to the table
  
  Args:
      *contents(*list): Contents of the row, each content will be placed in a separate cell
      colors(list[str]) : Text colors
      aligns(list[str]) : Text alignments
      widths(list[str]) : Text widths
docstr_tok: ["Add","a","row","to","the","table","Args",":","*","contents","(","*","list",")",":","Contents","of","the","row",",","each","content","will","be","placed","in","a","separate","cell","colors","(","list","[","str","]",")",":","Text","colors","aligns","(","list","[","str","]",")",":","Text","alignments","widths","(","list","[","str","]",")",":","Text","widths"]
code: def append(
      self,
      *contents,
      colors: List[str] = [],
      aligns: List[str] = [],
      widths: List[int] = [],
  ):
      """
      Add a row to the table
  
      Args:
          *contents(*list): Contents of the row, each content will be placed in a separate cell
          colors(list[str]) : Text colors
          aligns(list[str]) : Text alignments
          widths(list[str]) : Text widths
      """
      newrow = TableRow()
  
      widths = copy.deepcopy(self.widths) if not widths else widths
      colors = copy.deepcopy(self.colors) if not colors else colors
      aligns = copy.deepcopy(self.aligns) if not aligns else aligns
  
      for idx, content in enumerate(contents):
          width = widths[idx] if idx < len(widths) else len(content)
          color = colors[idx] if idx < len(colors) else ""
          align = aligns[idx] if idx < len(aligns) else ""
  
          newcell = TableCell(
              content, width=width, color=color, align=align
          )
          newrow.append(newcell)
          if idx >= len(self.columns):
              newcolumn = TableColumn()
  
              for row in self.rows:
                  cell = TableCell(
                      width=width, color=color, align=align
                  )
                  row.append(cell)
                  newcolumn.append(cell)
              newcolumn.append(newcell)
              self.columns.append(newcolumn)
          else:
              self.columns[idx].append(newcell)
  
      for idx in range(len(newrow), len(self.columns)):
          width = (
              widths[idx]
              if idx < len(widths)
              else self.columns[idx].width
          )
          color = colors[idx] if idx < len(colors) else ""
          align = aligns[idx] if idx < len(aligns) else ""
          cell = TableCell(width=width, color=color, align=align)
          newrow.append(cell)
  
      self.rows.append(newrow)
      self._adjust()
  
imports: import contextlib
  import copy
  import functools
  import logging
  import os
  import sys
  import time
  import threading
  from typing import List
  import colorlog
  from colorama import Fore
  import paddlehub.config
  from paddlehub.env import LOG_HOME
label_desc: Use image node_id 2 for calling the Table obj's underlying member method code with example usage: obj.append() without return types