code: def create_table_template(
      items: Sequence,
      list_name: Any,
      rows: int = 5,
      table_icon: Any = None,
  ) -> str:
      if not table_icon:
          table_icon = TABLE_ICON
  
      items_dict = json.dumps(items)
      code = CSS_CODE + custom_code
      template = Template(code)
      rows = min(len(items), rows)
      if len(items) == 0:
          cols = 0
      else:
          cols = (len(items[0].keys())) * 4
      return template.substitute(
          uid=str(UID()),
          element=items_dict,
          list_name=list_name,
          cols=cols,
          rows=rows,
          icon=table_icon,
          searchIcon=SEARCH_ICON,
          clipboardIcon=CLIPBOARD_ICON,
      )
  
imports: from collections.abc import Sequence
  import json
  from string import Template
  from typing import Any
  from ...types.uid import UID
label_desc: Use image node_id 1 for calling a global function with example usage: create_table_template(items, list_name, rows, table_icon) and returns: template