code: def test_cached_windows_sync_8803() -> None:
      assert (
          pl.DataFrame(
              [
                  pl.Series("id", [4, 5, 4, 6, 4, 5], dtype=pl.Int64),
                  pl.Series(
                      "is_valid",
                      [True, False, False, False, False, False],
                      dtype=pl.Boolean,
                  ),
              ]
          )
          .with_columns(
              a=pl.lit(True).is_in(pl.col("is_valid")).over("id"),
              b=pl.col("is_valid").sum().gt(0).over("id"),
          )
          .sum()
      ).to_dict(as_series=False) == {
          "id": [28],
          "is_valid": [1],
          "a": [3],
          "b": [3],
      }
  
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 16 for calling a global function with example usage: test_cached_windows_sync_8803() without return types