code: def create_table_metadata(
      table_name: str,
      database: Database,
      table_description: str = "",
      fetch_values_predicate: Optional[str] = None,
      schema: Optional[str] = None,
  ) -> SqlaTable:
      schema = schema or get_example_default_schema()
  
      table = get_table(table_name, database, schema)
      if not table:
          table = SqlaTable(
              schema=schema,
              table_name=table_name,
              normalize_columns=False,
              always_filter_main_dttm=False,
          )
          db.session.add(table)
      if fetch_values_predicate:
          table.fetch_values_predicate = fetch_values_predicate
      table.database = database
      table.description = table_description
      db.session.commit()
  
      return table
  
file_path: superset/tests/integration_tests/dashboard_utils.py
imports: import json
  from typing import Optional
  from pandas import DataFrame
  from superset import db
  from superset.connectors.sqla.models import SqlaTable
  from superset.models.core import Database
  from superset.models.dashboard import Dashboard
  from superset.models.slice import Slice
  from superset.utils.core import DatasourceType, get_example_default_schema
label_desc: Use image node_id 2 for calling a global function with example usage: create_table_metadata(table_name, database, table_description, fetch_values_predicate, schema) and returns: table