code: def create_from(query_params: dict[str, Any]) -> CreateTableAsSelect:
      ctas_method = query_params.get("ctas_method", CtasMethod.TABLE)
      schema = cast(str, query_params.get("schema"))
      tmp_table_name = cast(str, query_params.get("tmp_table_name"))
      return CreateTableAsSelect(ctas_method, schema, tmp_table_name)
  
imports: from __future__ import annotations
  import contextlib
  import json
  import logging
  from dataclasses import dataclass
  from typing import Any, cast, TYPE_CHECKING
  from flask import g
  from sqlalchemy.orm.exc import DetachedInstanceError
  from superset import is_feature_enabled
  from superset.models.sql_lab import Query
  from superset.sql_parse import CtasMethod
  from superset.utils import core
  from superset.utils.core import apply_max_row_limit, get_user_id
  from superset.utils.dates import now_as_float
  from superset.views.utils import get_cta_schema_name
label_desc: Use image node_id 2 for calling the CreateTableAsSelect obj's underlying member method code with example usage: obj.create_from(query_params) and returns: CreateTableAsSelect