code: def test_rolling_groupby_simple(agg):
      pdf = pd.DataFrame(
          {
              "a": [1, 1, 1, 1, 1, 1, 2, 2, 2, 2],
              "b": [1, 2, 3, 1, 2, 3, 1, 2, 3, 1],
          }
      )
      gdf = cudf.from_pandas(pdf)
  
      for window_size in range(1, len(pdf) + 1):
          with _hide_pandas_rolling_min_periods_warning(agg):
              expect = getattr(
                  pdf.groupby("a").rolling(window_size), agg
              )().fillna(-1)
          got = getattr(
              gdf.groupby("a").rolling(window_size), agg
          )().fillna(-1)
          assert_eq(expect, got, check_dtype=False)
  
      pdf = pd.DataFrame(
          {
              "a": [1, 1, 1, 2, 2],
              "b": [1, 1, 2, 2, 3],
              "c": [1, 2, 3, 4, 5],
          }
      )
      gdf = cudf.from_pandas(pdf)
  
      for window_size in range(1, len(pdf) + 1):
          with _hide_pandas_rolling_min_periods_warning(agg):
              expect = getattr(
                  pdf.groupby("a").rolling(window_size), agg
              )().fillna(-1)
          got = getattr(
              gdf.groupby("a").rolling(window_size), agg
          )().fillna(-1)
          assert_eq(expect, got, check_dtype=False)
  
imports: import math
  from contextlib import contextmanager
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf.core._compat import PANDAS_GE_150
  from cudf.testing._utils import _create_pandas_series_float64_default, assert_eq
  from cudf.testing.dataset_generator import rand_dataframe
label_desc: Use image node_id 14 for calling a global function with example usage: test_rolling_groupby_simple(agg) without return types