code: def print_athena_create_table(
      df: DataFrame,
      athena_table_name: str,
      s3location: str,
  ) -> None:
      """Generate the Athena create table statement for a given DataFrame.
  
      :param df: The pyspark.sql.DataFrame to use
      :param athena_table_name: The name of the athena table to generate
      :param s3location: The S3 location of the parquet data
      :return: None
      """
      fields = df.schema
  
      print(
          f"CREATE EXTERNAL TABLE IF NOT EXISTS `{athena_table_name}` ( "
      )
  
      for field in fields.fieldNames()[:-1]:
          print(
              "\t",
              f"`{fields[field].name}` {fields[field].dataType.simpleString()}, ",
          )
      last = fields[fields.fieldNames()[-1]]
      print("\t", f"`{last.name}` {last.dataType.simpleString()} ")
  
      print(")")
      print("STORED AS PARQUET")
      print(f"LOCATION '{s3location}'\n")
  
file_path: quinn/quinn/dataframe_helpers.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from typing import Any
  from pyspark.sql.types import StructField, StructType
label_desc: Use image node_id 4 for calling a global function with example usage: print_athena_create_table(df, athena_table_name, s3location) without return types