code: def test_shift_over_13041() -> None:
      df = pl.DataFrame(
          {
              "id": [0, 0, 0, 1, 1, 1],
              "cat_col": pl.Series(
                  ["a", "b", "c", "d", "e", "f"], dtype=pl.Categorical
              ),
          }
      )
      result = df.with_columns(pl.col("cat_col").shift(2).over("id"))
  
      assert result.to_dict(as_series=False) == {
          "id": [0, 0, 0, 1, 1, 1],
          "cat_col": [None, None, "a", None, None, "d"],
      }
  
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 43 for calling a global function with example usage: test_shift_over_13041() without return types