code: def test_list_recursive_categorical_cast() -> None:
      # go 3 deep, just to show off
      dtype = pl.List(pl.List(pl.List(pl.Categorical)))
      values = [[[["x"], ["y"]]], [[["x"]]]]
      s = pl.Series(values).cast(dtype)
      assert s.dtype == dtype
      assert s.to_list() == values
  
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 29 for calling a global function with example usage: test_list_recursive_categorical_cast() without return types