code: def complex_fields(schema: T.StructType) -> dict[str, object]:
      """Returns a dictionary of complex field names and their data types from the input DataFrame's schema.
  
      :param df: The input PySpark DataFrame.
      :type df: DataFrame
      :return: A dictionary with complex field names as keys and their respective data types as values.
      :rtype: Dict[str, object]
      """
      return {
          field.name: field.dataType
          for field in schema.fields
          if isinstance(
              field.dataType, (T.ArrayType, T.StructType, T.MapType)
          )
      }
  
file_path: quinn/quinn/schema_helpers.py
imports: from __future__ import annotations
  import json
  from typing import Optional
  from pyspark.sql import SparkSession
  from pyspark.sql import types
label_desc: Use image node_id 4 for calling a global function with example usage: complex_fields(schema) and returns: unknown