class_docstr: Helper class to create tables for the documentation.
  
  The ``generate`` method creates the table rst file (and possibly any other
  files, such as images, used by the table). This method internally calls
  the ``fetch_data``, ``get_header`` and ``get_row`` methods, which should be
  provided by any subclass.
  Each table is generated from a list of 'row_data' provided by the ``fetch_data``
  method. The ``get_header`` and ``get_row`` methods generate the required rst
  for the table's header and table's rows respectively.
class_docstr_tok: ["Helper","class","to","create","tables","for","the","documentation",".","The","``","generate","``","method","creates","the","table","rst","file","(","and","possibly","any","other","files",",","such","as","images",",","used","by","the","table",")",".","This","method","internally","calls","the","``","fetch_data","``",",","``","get_header","``","and","``","get_row","``","methods",",","which","should","be","provided","by","any","subclass",".","Each","table","is","generated","from","a","list","of","'row_data","'","provided","by","the","``","fetch_data","``","method",".","The","``","get_header","``","and","``","get_row","``","methods","generate","the","required","rst","for","the","table","'s","header","and","table","'s","rows","respectively","."]
docstr: Generate this table.
docstr_tok: ["Generate","this","table","."]
code: def generate(cls):
      """Generate this table."""
      assert cls.path is not None, "Subclasses should specify a path."
      data = cls.fetch_data()
  
      with io.StringIO() as fnew:
          fnew.write(cls.get_header(data))
          for i, row_data in enumerate(data):
              row = cls.get_row(i, row_data)
              if row is not None:
                  fnew.write(row)
  
          # if file exists, verify that we have no new content
          fnew.seek(0)
          new_txt = fnew.read()
  
      # determine if existing file needs to be rewritten
      if os.path.exists(cls.path):
          with open(cls.path) as fold:
              orig_txt = fold.read()
          if orig_txt == new_txt:
              new_txt = ""
  
      # write if there is any text to write. This avoids resetting the documentation cache
      if new_txt:
          with open(cls.path, "w", encoding="utf-8") as fout:
              fout.write(new_txt)
  
      pv.close_all()
  
imports: import io
  import os
  import textwrap
  import pyvista
label_desc: Use image node_id 1 for calling the DocTable obj's underlying member method code with example usage: obj.generate(cls) without return types