code: def test_selector_first_last(df: pl.DataFrame) -> None:
      assert df.select(cs.first()).columns == ["abc"]
      assert df.select(cs.last()).columns == ["qqR"]
  
      all_columns = set(df.columns)
      assert set(df.select(~cs.first()).columns) == (
          all_columns - {"abc"}
      )
      assert set(df.select(~cs.last()).columns) == (
          all_columns - {"qqR"}
      )
  
imports: from typing import Any
  import pytest
  import polars
  import polars.selectors
  from polars.selectors import expand_selector, is_selector
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 12 for calling a global function with example usage: test_selector_first_last(df) without return types