code: def test_categorical_concat_string_cached() -> None:
      with pl.StringCache():
          df1 = pl.DataFrame({"x": ["A"]}).with_columns(
              pl.col("x").cast(pl.Categorical)
          )
          df2 = pl.DataFrame({"x": ["B"]}).with_columns(
              pl.col("x").cast(pl.Categorical)
          )
  
      out = pl.concat([df1, df2])
      assert out.dtypes == [pl.Categorical]
      assert out["x"].to_list() == ["A", "B"]
  
imports: from __future__ import annotations
  import contextlib
  import io
  import operator
  from typing import TYPE_CHECKING, Any, Callable, Literal
  import pytest
  import polars
  from polars import StringCache
  from polars.exceptions import CategoricalRemappingWarning, StringCacheMismatchError
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 34 for calling a global function with example usage: test_categorical_concat_string_cached() without return types