code: def _render_table_html(
      table,
      metadata,
      show_indexes,
      show_datatypes,
      show_column_keys,
      show_schema_name,
      format_schema_name,
      format_table_name,
  ):
      # add in (PK) OR (FK) suffixes to column names that are considered to be primary key or foreign key
      use_column_key_attr = hasattr(
          ForeignKeyConstraint, "column_keys"
      )  # sqlalchemy > 1.0 uses column_keys to return list of strings for foreign keys, previously was columns
      if show_column_keys:
          if use_column_key_attr:
              # sqlalchemy > 1.0
              fk_col_names = set(
                  [
                      h
                      for f in table.foreign_key_constraints
                      for h in f.columns.keys()
                  ]
              )
          else:
              # sqlalchemy pre 1.0?
              fk_col_names = set(
                  [
                      h.name
                      for f in table.foreign_keys
                      for h in f.constraint.columns
                  ]
              )
          # fk_col_names = set([h for f in table.foreign_key_constraints for h in f.columns.keys()])
          pk_col_names = set(
              [f for f in table.primary_key.columns.keys()]
          )
      else:
          fk_col_names = set()
          pk_col_names = set()
  
      def format_col_type(col):
          try:
              return col.type.get_col_spec()
          except (AttributeError, NotImplementedError):
              return str(col.type)
  
      def format_col_str(col):
          # add in (PK) OR (FK) suffixes to column names that are considered to be primary key or foreign key
          suffix = (
              "(FK)"
              if col.name in fk_col_names
              else "(PK)"
              if col.name in pk_col_names
              else ""
          )
          if show_datatypes:
              return "- %s : %s" % (
                  col.name + suffix,
                  format_col_type(col),
              )
          else:
              return "- %s" % (col.name + suffix)
  
      def format_name(obj_name, format_dict):
          # Check if format_dict was provided
          if format_dict is not None:
              # Should color be checked? Could use  /^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/
              return '<FONT COLOR="{color}" POINT-SIZE="{size}">{bld}{it}{name}{e_it}{e_bld}</FONT>'.format(
                  name=obj_name,
                  color=format_dict.get("color")
                  if "color" in format_dict
                  else "initial",
                  size=float(format_dict["fontsize"])
                  if "fontsize" in format_dict
                  else "initial",
                  it="<I>" if format_dict.get("italics") else "",
                  e_it="</I>" if format_dict.get("italics") else "",
                  bld="<B>" if format_dict.get("bold") else "",
                  e_bld="</B>" if format_dict.get("bold") else "",
              )
          else:
              return obj_name
  
      schema_str = ""
      if (
          show_schema_name == True
          and hasattr(table, "schema")
          and table.schema is not None
      ):
          # Build string for schema name, empty if show_schema_name is False
          schema_str = format_name(table.schema, format_schema_name)
      table_str = format_name(table.name, format_table_name)
  
      # Assemble table header
      html = (
          '<<TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0"><TR><TD ALIGN="CENTER">%s%s%s</TD></TR><TR><TD BORDER="1" CELLPADDING="0"></TD></TR>'
          % (schema_str, "." if show_schema_name else "", table_str)
      )
  
      html += "".join(
          '<TR><TD ALIGN="LEFT" PORT="%s">%s</TD></TR>'
          % (col.name, format_col_str(col))
          for col in table.columns
      )
      if metadata.bind and isinstance(metadata.bind.dialect, PGDialect):
          # postgres engine doesn't reflect indexes
          indexes = dict(
              (name, defin)
              for name, defin in metadata.bind.execute(
                  text(
                      "SELECT indexname, indexdef FROM pg_indexes WHERE tablename = '%s'"
                      % table.name
                  )
              )
          )
          if indexes and show_indexes:
              html += '<TR><TD BORDER="1" CELLPADDING="0"></TD></TR>'
              for index, defin in indexes.items():
                  ilabel = "UNIQUE" in defin and "UNIQUE " or "INDEX "
                  ilabel += defin[defin.index("(") :]
                  html += '<TR><TD ALIGN="LEFT">%s</TD></TR>' % ilabel
      html += "</TABLE>>"
      return html
  
file_path: evadb/script/docs/catalog_plotter.py
imports: from evadb.catalog.catalog_manager import CatalogManager
  from evadb.configuration.configuration_manager import ConfigurationManager
  from sqlalchemy.orm.properties import RelationshipProperty
  import pydot
  import types
  from sqlalchemy.dialects.postgresql.base import PGDialect
  from sqlalchemy import MetaData, Table, text, ForeignKeyConstraint
label_desc: Use image node_id 4 for calling a global function with example usage: _render_table_html(table, metadata, show_indexes, show_datatypes, show_column_keys, show_schema_name, format_schema_name, format_table_name) and returns: html, col, unknown, unknown, str, obj_name, str