code: def test_struct_agg_all() -> None:
      df = pl.DataFrame(
          {
              "group": ["a", "a", "b", "b", "b"],
              "col1": [
                  {"x": 1, "y": 100},
                  {"x": 2, "y": 200},
                  {"x": 3, "y": 300},
                  {"x": 4, "y": 400},
                  {"x": 5, "y": 500},
              ],
          }
      )
  
      assert df.group_by("group", maintain_order=True).all().to_dict(
          as_series=False
      ) == {
          "group": ["a", "b"],
          "col1": [
              [{"x": 1, "y": 100}, {"x": 2, "y": 200}],
              [
                  {"x": 3, "y": 300},
                  {"x": 4, "y": 400},
                  {"x": 5, "y": 500},
              ],
          ],
      }
  
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 18 for calling a global function with example usage: test_struct_agg_all() without return types