code: def test_indexer_accepts_rolling_args():
      df = DataFrame({"values": range(5)})
  
      class CustomIndexer(BaseIndexer):
          def get_window_bounds(
              self, num_values, min_periods, center, closed, step
          ):
              start = np.empty(num_values, dtype=np.int64)
              end = np.empty(num_values, dtype=np.int64)
              for i in range(num_values):
                  if (
                      center
                      and min_periods == 1
                      and closed == "both"
                      and step == 1
                      and i == 2
                  ):
                      start[i] = 0
                      end[i] = num_values
                  else:
                      start[i] = i
                      end[i] = i + self.window_size
              return start, end
  
      indexer = CustomIndexer(window_size=1)
      result = df.rolling(
          indexer, center=True, min_periods=1, closed="both", step=1
      ).sum()
      expected = DataFrame({"values": [0.0, 1.0, 10.0, 3.0, 4.0]})
      tm.assert_frame_equal(result, expected)
  
imports: import numpy
  import pytest
  from pandas import DataFrame, MultiIndex, Series, concat, date_range
  import pandas._testing
  from pandas.api.indexers import BaseIndexer, FixedForwardWindowIndexer
  from pandas.core.indexers.objects import ExpandingIndexer, FixedWindowIndexer, VariableOffsetWindowIndexer
  from pandas.tseries.offsets import BusinessDay
label_desc: Use image node_id 4 for calling a global function with example usage: test_indexer_accepts_rolling_args() and returns: start,  end