code: def test_merge_lit_under_global_cache_4491() -> None:
      df = pl.DataFrame(
          [
              pl.Series("label", ["foo", "bar"], dtype=pl.Categorical),
              pl.Series("value", [3, 9]),
          ]
      )
      assert df.with_columns(
          pl.when(pl.col("value") > 5)
          .then(pl.col("label"))
          .otherwise(pl.lit(None, pl.Categorical))
      ).to_dict(as_series=False) == {
          "label": [None, "bar"],
          "value": [3, 9],
      }
  
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 18 for calling a global function with example usage: test_merge_lit_under_global_cache_4491() without return types