code: def test_rolling_groupby_offset(agg, window_size):
      pdf = pd.DataFrame(
          {
              "date": pd.date_range(
                  start="2016-01-01", periods=7, freq="D"
              ),
              "group": [1, 2, 2, 1, 1, 2, 1],
              "val": [5, 6, 7, 8, 1, 2, 3],
          }
      ).set_index("date")
      gdf = cudf.from_pandas(pdf)
      expect = getattr(
          pdf.groupby("group").rolling(window_size), agg
      )().fillna(-1)
      got = getattr(
          gdf.groupby("group").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 16 for calling a global function with example usage: test_rolling_groupby_offset(agg, window_size) without return types