code: def test_local_categorical_list() -> None:
      values = [["a", "b"], ["c"], ["a", "d", "d"]]
      s = pl.Series(values, dtype=pl.List(pl.Categorical))
      assert s.dtype == pl.List
      assert s.dtype.inner == pl.Categorical  # type: ignore[attr-defined]
      assert s.to_list() == values
  
      # Check that underlying physicals match
      idx_df = pl.Series(
          [[0, 1], [2], [0, 3, 3]], dtype=pl.List(pl.UInt32)
      )
      assert_series_equal(s.cast(pl.List(pl.UInt32)), idx_df)
  
      # Check if the categories array does not overlap
      assert s.list.explode().cat.get_categories().to_list() == [
          "a",
          "b",
          "c",
          "d",
      ]
  
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 11 for calling a global function with example usage: test_local_categorical_list() without return types