code: def test_shift_frame(fruits_cars: pl.DataFrame) -> None:
      df = pl.DataFrame({"a": [1, 2, 3, 4, 5], "b": [1, 2, 3, 4, 5]})
      out = df.select(pl.col("a").shift(1))
      assert_series_equal(out["a"], pl.Series("a", [None, 1, 2, 3, 4]))
  
      res = fruits_cars.lazy().shift(2).collect()
  
      expected = pl.DataFrame(
          {
              "A": [None, None, 1, 2, 3],
              "fruits": [None, None, "banana", "banana", "apple"],
              "B": [None, None, 5, 4, 3],
              "cars": [None, None, "beetle", "audi", "beetle"],
          }
      )
      assert_frame_equal(res, expected)
  
      # negative value
      res = fruits_cars.lazy().shift(-2).collect()
      for rows in [3, 4]:
          for cols in range(4):
              assert res[rows, cols] is None
  
file_path: polars/py-polars/tests/unit/operations/test_shift.py
imports: from __future__ import annotations
  from datetime import date
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_shift_frame(fruits_cars) without return types