code: def test_flatten_struct(spark):
      data = [
          (1, ("name1", "address1", 20)),
          (2, ("name2", "address2", 30)),
          (3, ("name3", "address3", 40)),
      ]
      schema = StructType(
          [
              StructField("id", IntegerType(), True),
              StructField(
                  "details",
                  StructType(
                      [
                          StructField("name", StringType(), True),
                          StructField("address", StringType(), True),
                          StructField("age", IntegerType(), True),
                      ]
                  ),
                  True,
              ),
          ]
      )
      df = spark.createDataFrame(data, schema)
      flattened_df = flatten_struct(df, "details")
      expected_data = [
          (1, "name1", "address1", 20),
          (2, "name2", "address2", 30),
          (3, "name3", "address3", 40),
      ]
      expected_schema = StructType(
          [
              StructField("id", IntegerType(), True),
              StructField("details:name", StringType(), True),
              StructField("details:address", StringType(), True),
              StructField("details:age", IntegerType(), True),
          ]
      )
      expected_df = spark.createDataFrame(
          expected_data, expected_schema
      )
      chispa.assert_df_equality(flattened_df, expected_df)
  
imports: from __future__ import annotations
  import pytest
  import chispa
  import quinn
  from pyspark.sql import DataFrame
  from pyspark.sql.types import StructType, StructField, StringType, IntegerType, ArrayType, MapType
  from quinn.transformations import flatten_struct, flatten_map, flatten_dataframe
  from tests.conftest import auto_inject_fixtures
label_desc: Use image node_id 25 for calling a global function with example usage: test_flatten_struct(spark) without return types