code: def test_time_rule_frame(raw, frame):
      win = 25
      minp = 10
      frm = frame[::2].resample("B").mean()
      frame_result = frm.rolling(window=win, min_periods=minp).apply(
          f, raw=raw
      )
      last_date = frame_result.index[-1]
      prev_date = last_date - 24 * offsets.BDay()
  
      trunc_frame = frame[::2].truncate(prev_date, last_date)
      tm.assert_series_equal(
          frame_result.xs(last_date),
          trunc_frame.apply(np.mean, raw=raw),
          check_names=False,
      )
  
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 17 for calling a global function with example usage: test_time_rule_frame(raw, frame) without return types