code: def get_virtual_table_metadata(
      dataset: SqlaTable,
  ) -> list[ResultSetColumnType]:
      """Use SQLparser to get virtual dataset metadata"""
      if not dataset.sql:
          raise SupersetGenericDBErrorException(
              message=_("Virtual dataset query cannot be empty"),
          )
  
      db_engine_spec = dataset.database.db_engine_spec
      sql = dataset.get_template_processor().process_template(
          dataset.sql, **dataset.template_params_dict
      )
      parsed_query = ParsedQuery(sql)
      if not db_engine_spec.is_readonly_query(parsed_query):
          raise SupersetSecurityException(
              SupersetError(
                  error_type=SupersetErrorType.DATASOURCE_SECURITY_ACCESS_ERROR,
                  message=_("Only `SELECT` statements are allowed"),
                  level=ErrorLevel.ERROR,
              )
          )
      statements = parsed_query.get_statements()
      if len(statements) > 1:
          raise SupersetSecurityException(
              SupersetError(
                  error_type=SupersetErrorType.DATASOURCE_SECURITY_ACCESS_ERROR,
                  message=_("Only single queries supported"),
                  level=ErrorLevel.ERROR,
              )
          )
      return get_columns_description(
          dataset.database, dataset.schema, statements[0]
      )
  
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 2 for calling a global function with example usage: get_virtual_table_metadata(dataset) and returns: get_columns_description