code: def test_group_by_null_propagation_6185() -> None:
      df_1 = pl.DataFrame({"A": [0, 0], "B": [1, 2]})
  
      expr = pl.col("A").filter(pl.col("A") > 0)
  
      expected = {"B": [1, 2], "A": [None, None]}
      assert (
          df_1.group_by("B")
          .agg((expr - expr.mean()).mean())
          .sort("B")
          .to_dict(as_series=False)
          == expected
      )
  
imports: from __future__ import annotations
  from collections import OrderedDict
  from datetime import datetime, timedelta
  from typing import Any
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 21 for calling a global function with example usage: test_group_by_null_propagation_6185() without return types