code: def test_count_window() -> None:
      assert (
          pl.DataFrame(
              {
                  "a": [1, 1, 2],
              }
          )
          .with_columns(pl.count().over("a"))["count"]
          .to_list()
      ) == [2, 2, 1]
  
imports: from __future__ import annotations
  import numpy
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 9 for calling a global function with example usage: test_count_window() without return types