code: def test_nested_dictionary() -> None:
      with pl.StringCache():
          df = (
              pl.DataFrame(
                  {
                      "str": ["A", "B", "A", "B", "C"],
                      "group": [1, 1, 2, 1, 2],
                  }
              )
              .with_columns(pl.col("str").cast(pl.Categorical))
              .group_by("group")
              .agg([pl.col("str").alias("cat_list")])
          )
          f = io.BytesIO()
          df.write_parquet(f)
          f.seek(0)
  
          read_df = pl.read_parquet(f)
          assert_frame_equal(df, read_df)
  
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 16 for calling a global function with example usage: test_nested_dictionary() without return types