code: def test_list_shift() -> None:
      s = pl.Series("a", [[1, 2], [3, 2, 1]])
      expected = pl.Series("a", [[None, 1], [None, 3, 2]])
      assert s.list.shift().to_list() == expected.to_list()
  
      df = pl.DataFrame(
          {
              "values": [
                  [1, 2, None],
                  [1, 2, 3],
                  [None, 1, 2],
                  [None, None, None],
                  [1, 2],
              ],
              "shift": [1, -2, 3, 2, None],
          }
      )
      df = df.select(pl.col("values").list.shift(pl.col("shift")))
      expected_df = pl.DataFrame(
          {
              "values": [
                  [None, 1, 2],
                  [3, None, None],
                  [None, None, None],
                  [None, None, None],
                  None,
              ]
          }
      )
      assert_frame_equal(df, expected_df)
  
imports: from __future__ import annotations
  from datetime import date, datetime
  import numpy
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 7 for calling a global function with example usage: test_list_shift() without return types