code: def test_distinct_projection_pd_7578() -> None:
      df = pl.DataFrame(
          {
              "foo": ["0", "1", "2", "1", "2"],
              "bar": ["a", "a", "a", "b", "b"],
          }
      )
  
      q = df.lazy().unique().group_by("bar").agg(pl.count())
      assert q.collect().sort("bar").to_dict(as_series=False) == {
          "bar": ["a", "b"],
          "count": [3, 2],
      }
  
file_path: polars/py-polars/tests/unit/test_projections.py
imports: import numpy
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 12 for calling a global function with example usage: test_distinct_projection_pd_7578() without return types