code: def test_recursive_logical_type() -> None:
      df = pl.DataFrame(
          {"str": ["A", "B", "A", "B", "C"], "group": [1, 1, 2, 1, 2]}
      )
      df = df.with_columns(pl.col("str").cast(pl.Categorical))
  
      df_groups = df.group_by("group").agg(
          [pl.col("str").alias("cat_list")]
      )
      f = io.BytesIO()
      df_groups.write_parquet(f, use_pyarrow=True)
      f.seek(0)
      read = pl.read_parquet(f, use_pyarrow=True)
      assert read.dtypes == [pl.Int64, pl.List(pl.Categorical)]
      assert read.shape == (2, 2)
  
imports: from __future__ import annotations
  import io
  from datetime import datetime, time, timezone
  from decimal import Decimal
  from typing import TYPE_CHECKING
  import numpy
  import pandas
  import pyarrow
  import pyarrow.dataset
  import pyarrow.parquet
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 15 for calling a global function with example usage: test_recursive_logical_type() without return types