code: def test_cat_uses_lexical_ordering() -> None:
      s = pl.Series(["a", "b", None, "b"]).cast(pl.Categorical)
      assert s.cat.uses_lexical_ordering() is False
  
      s = s.cast(pl.Categorical("lexical"))
      assert s.cat.uses_lexical_ordering() is True
  
      s = s.cast(pl.Categorical("physical"))
      assert s.cat.uses_lexical_ordering() is False
  
file_path: polars/py-polars/tests/unit/namespaces/test_categorical.py
imports: import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 9 for calling a global function with example usage: test_cat_uses_lexical_ordering() without return types