code: def get_columns_description(
      database: Database,
      schema: str | None,
      query: str,
  ) -> list[ResultSetColumnType]:
      # TODO(villebro): refactor to use same code that's used by
      #  sql_lab.py:execute_sql_statements
      db_engine_spec = database.db_engine_spec
      try:
          with database.get_raw_connection(schema=schema) as conn:
              cursor = conn.cursor()
              query = database.apply_limit_to_sql(query, limit=1)
              cursor.execute(query)
              db_engine_spec.execute(cursor, query)
              result = db_engine_spec.fetch_data(cursor, limit=1)
              result_set = SupersetResultSet(
                  result, cursor.description, db_engine_spec
              )
              return result_set.columns
      except Exception as ex:
          raise SupersetGenericDBErrorException(message=str(ex)) from ex
  
imports: from __future__ import annotations
  import logging
  from collections.abc import Iterable, Iterator
  from functools import lru_cache
  from typing import Callable, TYPE_CHECKING, TypeVar
  from uuid import UUID
  from flask_babel import lazy_gettext
  from sqlalchemy.engine.url import URL
  from sqlalchemy.exc import NoSuchTableError
  from sqlalchemy.ext.declarative import DeclarativeMeta
  from sqlalchemy.orm import Session
  from sqlalchemy.orm.exc import ObjectDeletedError
  from sqlalchemy.sql.type_api import TypeEngine
  from superset.constants import LRU_CACHE_MAX_SIZE
  from superset.errors import ErrorLevel, SupersetError, SupersetErrorType
  from superset.exceptions import SupersetGenericDBErrorException, SupersetSecurityException
  from superset.models.core import Database
  from superset.result_set import SupersetResultSet
  from superset.sql_parse import ParsedQuery
  from superset.superset_typing import ResultSetColumnType
label_desc: Use image node_id 3 for calling a global function with example usage: get_columns_description(database, schema, query) and returns: result_set