code: def test_rolling_apply_out_of_bounds(engine_and_raw):
      # gh-1850
      engine, raw = engine_and_raw
  
      vals = Series([1, 2, 3, 4])
  
      result = vals.rolling(10).apply(np.sum, engine=engine, raw=raw)
      assert result.isna().all()
  
      result = vals.rolling(10, min_periods=1).apply(
          np.sum, engine=engine, raw=raw
      )
      expected = Series([1, 3, 6, 10], dtype=float)
      tm.assert_almost_equal(result, expected)
  
imports: import numpy
  import pytest
  from pandas import DataFrame, Index, MultiIndex, Series, Timestamp, concat, date_range, isna, notna
  import pandas._testing
  from pandas.tseries import offsets
label_desc: Use image node_id 3 for calling a global function with example usage: test_rolling_apply_out_of_bounds(engine_and_raw) without return types