docstr: Reformats the query into the create table as query.
  
  Works only for the single select SQL statements, in all other cases
  the sql query is not modified.
  :param table_name: table that will contain the results of the query execution
  :param schema_name: schema name for the target table
  :param overwrite: table_name will be dropped if true
  :param method: method for the CTA query, currently view or table creation
  :return: Create table as query
code: def as_create_table(
      self,
      table_name: str,
      schema_name: Optional[str] = None,
      overwrite: bool = False,
      method: CtasMethod = CtasMethod.TABLE,
  ) -> str:
      """Reformats the query into the create table as query.
  
      Works only for the single select SQL statements, in all other cases
      the sql query is not modified.
      :param table_name: table that will contain the results of the query execution
      :param schema_name: schema name for the target table
      :param overwrite: table_name will be dropped if true
      :param method: method for the CTA query, currently view or table creation
      :return: Create table as query
      """
      exec_sql = ""
      sql = self.stripped()
      # TODO(bkyryliuk): quote full_table_name
      full_table_name = (
          f"{schema_name}.{table_name}" if schema_name else table_name
      )
      if overwrite:
          exec_sql = f"DROP {method} IF EXISTS {full_table_name};\n"
      exec_sql += f"CREATE {method} {full_table_name} AS \n{sql}"
      return exec_sql
  
imports: import logging
  import re
  from collections.abc import Iterator
  from dataclasses import dataclass
  from typing import Any, cast, Optional
  from urllib import parse
  import sqlparse
  from sqlalchemy import and_
  from sqlparse import keywords
  from sqlparse.lexer import Lexer
  from sqlparse.sql import Identifier, IdentifierList, Parenthesis, remove_quotes, Token, TokenList, Where
  from sqlparse.tokens import Comment, CTE, DDL, DML, Keyword, Name, Punctuation, String, Whitespace, Wildcard
  from sqlparse.utils import imt
  from superset.exceptions import QueryClauseValidationException
  from superset.utils.backports import StrEnum
label_desc: Use image node_id 20 for calling the ParsedQuery obj's underlying member method code with example usage: obj.as_create_table(table_name, schema_name, overwrite, method) and returns: exec_sql