code: def main():
      items = [Item('Name1', 'Description1', [SubItem('r1sr1c1', 'r1sr1c2'),
                                              SubItem('r1sr2c1', 'r1sr2c2')]),
               Item('Name2', 'Description2', [SubItem('r2sr1c1', 'r2sr1c2'),
                                              SubItem('r2sr2c1', 'r2sr2c2')]),
               ]
  
      table = ItemTable(items)
  
      # or {{ table }} in jinja
      print(table.__html__())
  
      
docs: Outputs:
  
      <table>
        <thead>
          <tr><th>Name</th><th>Description</th><th>Subtable</th></tr>
        </thead>
        <tbody>
          <tr><td>Name1</td><td>Description1</td><td><table>
                <thead>
                  <tr><th>Sub-column 1</th><th>Sub-column 2</th></tr>
                </thead>
                <tbody>
                  <tr><td>r1sr1c1</td><td>r1sr1c2</td></tr>
                  <tr><td>r1sr2c1</td><td>r1sr2c2</td></tr>
                </tbody>
          </table></td></tr>
          <tr><td>Name2</td><td>Description2</td><td><table>
                <thead>
                  <tr><th>Sub-column 1</th><th>Sub-column 2</th></tr>
                </thead>
                <tbody>
                  <tr><td>r2sr1c1</td><td>r2sr1c2</td></tr>
                  <tr><td>r2sr2c1</td><td>r2sr2c2</td></tr>
                </tbody>
          </table></td></tr>
        </tbody>
      </table>
  
      Except it doesn't bother to prettify the output.