code: def test_flatten_map(spark):
      data = [
          (1, {"name": "Alice", "age": 25}),
          (2, {"name": "Bob", "age": 30}),
          (3, {"name": "Charlie", "age": 35}),
      ]
      schema = StructType(
          [
              StructField("id", IntegerType(), True),
              StructField(
                  "details", MapType(StringType(), StringType()), True
              ),
          ]
      )
      df = spark.createDataFrame(data, schema)
      flattened_df = flatten_map(df, "details")
      expected_schema = StructType(
          [
              StructField("id", IntegerType(), True),
              StructField("details:name", StringType(), True),
              StructField("details:age", StringType(), True),
          ]
      )
      expected_data = [
          (1, "Alice", "25"),
          (2, "Bob", "30"),
          (3, "Charlie", "35"),
      ]
      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 26 for calling a global function with example usage: test_flatten_map(spark) without return types