code: def test_logical_type_struct_agg_list() -> None:
      df = pl.DataFrame(
          {"cats": ["Value1", "Value2", "Value1"]},
          schema_overrides={"cats": pl.Categorical},
      )
      out = df.group_by(1).agg(pl.struct("cats"))
      assert out.dtypes == [
          pl.Int32,
          pl.List(pl.Struct([pl.Field("cats", pl.Categorical)])),
      ]
      assert out["cats"].to_list() == [
          [{"cats": "Value1"}, {"cats": "Value2"}, {"cats": "Value1"}]
      ]
  
imports: from __future__ import annotations
  import pickle
  from datetime import date, datetime, time
  from typing import TYPE_CHECKING, Any
  import pandas
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 27 for calling a global function with example usage: test_logical_type_struct_agg_list() without return types