code: def table_has_column(table: str, column: str) -> bool:
      """
      Checks if a column exists in a given table.
  
      :param table: A table name
      :param column: A column name
      :returns: True iff the column exists in the table
      """
  
      insp = inspect(op.get_context().bind)
  
      try:
          return any(
              col["name"] == column for col in insp.get_columns(table)
          )
      except NoSuchTableError:
          return False
  
file_path: superset/superset/migrations/shared/utils.py
imports: import json
  import logging
  import os
  import time
  from collections.abc import Iterator
  from typing import Any, Callable, Optional, Union
  from uuid import uuid4
  from alembic import op
  from sqlalchemy import engine_from_config, inspect
  from sqlalchemy.dialects.mysql.base import MySQLDialect
  from sqlalchemy.dialects.postgresql.base import PGDialect
  from sqlalchemy.engine import reflection
  from sqlalchemy.exc import NoSuchTableError
  from sqlalchemy.orm import Query, Session
label_desc: Use image node_id 1 for calling a global function with example usage: table_has_column(table, column) and returns: any, False