code: def test_rolling_apply(self, raw, roll_frame):
      g = roll_frame.groupby("A", group_keys=False)
      r = g.rolling(window=4)
  
      # reduction
      result = r.apply(lambda x: x.sum(), raw=raw)
      msg = "DataFrameGroupBy.apply operated on the grouping columns"
      with tm.assert_produces_warning(FutureWarning, match=msg):
          expected = g.apply(
              lambda x: x.rolling(4).apply(lambda y: y.sum(), raw=raw)
          )
      # groupby.apply doesn't drop the grouped-by column
      expected = expected.drop("A", axis=1)
      # GH 39732
      expected_index = MultiIndex.from_arrays(
          [roll_frame["A"], range(40)]
      )
      expected.index = expected_index
      tm.assert_frame_equal(result, expected)
  
imports: import numpy
  import pytest
  from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, Series, Timestamp, date_range, to_datetime
  import pandas._testing
  from pandas.api.indexers import BaseIndexer
  from pandas.core.groupby.groupby import get_groupby
label_desc: Use image node_id 11 for calling the TestRolling obj's underlying member method code with example usage: obj.test_rolling_apply(raw, roll_frame) without return types