code: def test_struct_applies_as_map() -> None:
      df = pl.DataFrame(
          {"id": [1, 1, 2], "x": ["a", "b", "c"], "y": ["d", "e", "f"]}
      )
  
      # the window function doesn't really make sense
      # but it runs the test: #7286
      assert df.select(
          pl.struct([pl.col("x"), pl.col("y") + pl.col("y")]).over("id")
      ).to_dict(as_series=False) == {
          "x": [
              {"x": "a", "y": "dd"},
              {"x": "b", "y": "ee"},
              {"x": "c", "y": "ff"},
          ]
      }
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from datetime import datetime, time
  from typing import TYPE_CHECKING
  import pandas
  import pyarrow
  import pytest
  import polars
  import polars.selectors
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 41 for calling a global function with example usage: test_struct_applies_as_map() without return types