code: def test_cumulative_eval_window_functions() -> None:
      df = pl.DataFrame(
          {
              "group": [0, 0, 0, 1, 1, 1],
              "val": [20, 40, 30, 2, 4, 3],
          }
      )
  
      result = df.with_columns(
          pl.col("val")
          .cumulative_eval(pl.element().max())
          .over("group")
          .alias("cumulative_eval_max")
      )
      expected = pl.DataFrame(
          {
              "group": [0, 0, 0, 1, 1, 1],
              "val": [20, 40, 30, 2, 4, 3],
              "cumulative_eval_max": [20, 40, 40, 2, 4, 4],
          }
      )
      assert_frame_equal(result, expected)
  
      # 6394
      df = pl.DataFrame(
          {"group": [1, 1, 2, 3], "value": [1, None, 3, None]}
      )
      result = df.select(
          pl.col("value")
          .cumulative_eval(pl.element().mean())
          .over("group")
      )
      expected = pl.DataFrame({"value": [1.0, 1.0, 3.0, None]})
      assert_frame_equal(result, expected)
  
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 8 for calling a global function with example usage: test_cumulative_eval_window_functions() without return types