code: def test_parquet_struct_categorical(tmp_path: Path) -> None:
      tmp_path.mkdir(exist_ok=True)
  
      df = pl.DataFrame(
          [
              pl.Series("a", ["bob"], pl.Categorical),
              pl.Series("b", ["foo"], pl.Categorical),
          ]
      )
  
      file_path = tmp_path / "categorical.parquet"
      df.write_parquet(file_path)
  
      with pl.StringCache():
          out = pl.read_parquet(file_path).select(
              pl.col("b").value_counts()
          )
      assert out.to_dict(as_series=False) == {
          "b": [{"b": "foo", "count": 1}]
      }
  
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 35 for calling a global function with example usage: test_parquet_struct_categorical(tmp_path) without return types