code: def test_indexer_constructor_arg():
      # Example found in computation.rst
      use_expanding = [True, False, True, False, True]
      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 self.use_expanding[i]:
                      start[i] = 0
                      end[i] = i + 1
                  else:
                      start[i] = i
                      end[i] = i + self.window_size
              return start, end
  
      indexer = CustomIndexer(
          window_size=1, use_expanding=use_expanding
      )
      result = df.rolling(indexer).sum()
      expected = DataFrame({"values": [0.0, 1.0, 3.0, 3.0, 10.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 3 for calling a global function with example usage: test_indexer_constructor_arg() and returns: start,  end