code: def test_group_by_agg_equals_zero_3535() -> None:
      # setup test frame
      df = pl.DataFrame(
          data=[
              # note: the 'bb'-keyed values should clearly sum to 0
              ("aa", 10, None),
              ("bb", -10, 0.5),
              ("bb", 10, -0.5),
              ("cc", -99, 10.5),
              ("cc", None, 0.0),
          ],
          schema=[
              ("key", pl.String),
              ("val1", pl.Int16),
              ("val2", pl.Float32),
          ],
      )
      # group by the key, aggregating the two numeric cols
      assert df.group_by(pl.col("key"), maintain_order=True).agg(
          [pl.col("val1").sum(), pl.col("val2").sum()]
      ).to_dict(as_series=False) == {
          "key": ["aa", "bb", "cc"],
          "val1": [10, 0, -99],
          "val2": [0.0, 0.0, 10.5],
      }
  
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 9 for calling a global function with example usage: test_group_by_agg_equals_zero_3535() without return types