code: def test_list_count_matches_deprecated() -> None:
      df = pl.DataFrame(
          {"listcol": [[], [1], [1, 2, 3, 2], [1, 2, 1], [4, 4]]}
      )
      with pytest.deprecated_call():
          result = df.select(
              pl.col("listcol")
              .list.count_match(2)
              .alias("number_of_twos")
          )
  
      expected = {"number_of_twos": [0, 0, 2, 1, 0]}
      assert result.to_dict(as_series=False) == expected
  
imports: from __future__ import annotations
  import pickle
  from datetime import date, datetime, time
  from typing import TYPE_CHECKING, Any
  import pandas
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 17 for calling a global function with example usage: test_list_count_matches_deprecated() without return types