code: def test_repeat_expansion_in_group_by() -> None:
      out = (
          pl.DataFrame({"g": [1, 2, 2, 3, 3, 3]})
          .group_by("g", maintain_order=True)
          .agg(pl.repeat(1, pl.count()).cum_sum())
          .to_dict(as_series=False)
      )
      assert out == {"g": [1, 2, 3], "repeat": [[1], [1, 2], [1, 2, 3]]}
  
imports: from __future__ import annotations
  from datetime import datetime, timedelta
  from typing import Any
  import numpy
  import pandas
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_repeat_expansion_in_group_by() without return types