code: def test_fold_reduce() -> None:
      df = pl.DataFrame({"a": [1, 2, 3], "b": [1.0, 2.0, 3.0]})
  
      out = df.select(
          pl.fold(
              acc=pl.lit(0),
              function=lambda acc, x: acc + x,
              exprs=pl.all(),
          ).alias("foo")
      )
      assert out["foo"].to_list() == [2, 4, 6]
      out = df.select(
          pl.reduce(
              function=lambda acc, x: acc + x, exprs=pl.all()
          ).alias("foo")
      )
      assert out["foo"].to_list() == [2, 4, 6]
  
imports: import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 1 for calling a global function with example usage: test_fold_reduce() without return types