code: def test_complex_fields(spark):
      schema = StructType(
          [
              StructField("id", IntegerType(), True),
              StructField(
                  "details",
                  StructType(
                      [
                          StructField("name", StringType(), True),
                          StructField("address", StringType(), True),
                          StructField("age", IntegerType(), True),
                      ]
                  ),
                  True,
              ),
          ]
      )
      expected = {
          "details": StructType(
              [
                  StructField("name", StringType(), True),
                  StructField("address", StringType(), True),
                  StructField("age", IntegerType(), True),
              ]
          )
      }
      assert complex_fields(schema) == expected
  
file_path: quinn/tests/test_schema_helpers.py
imports: from __future__ import annotations
  from pyspark.sql.types import StructType, IntegerType, DecimalType, ArrayType, FloatType, MapType, StringType, DoubleType, TimestampType, StructField
  import pyspark.sql.dataframe
  from quinn.schema_helpers import print_schema_as_code, schema_from_csv, complex_fields
  from chispa.schema_comparer import assert_basic_schema_equality
  import pytest
  from tests.conftest import auto_inject_fixtures
label_desc: Use image node_id 5 for calling a global function with example usage: test_complex_fields(spark) without return types