code: def test_slice() -> None:
      vals = [[1, 2, 3, 4], [10, 2, 1]]
      s = pl.Series("a", vals)
      assert s.list.head(2).to_list() == [[1, 2], [10, 2]]
      assert s.list.tail(2).to_list() == [[3, 4], [2, 1]]
      assert s.list.tail(200).to_list() == vals
      assert s.list.head(200).to_list() == vals
      assert s.list.slice(1, 2).to_list() == [[2, 3], [2, 1]]
  
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 11 for calling a global function with example usage: test_slice() without return types