code: def test_series(series, sp_func, roll_func):
      sp_stats = pytest.importorskip("scipy.stats")
  
      compare_func = partial(getattr(sp_stats, sp_func), bias=False)
      result = getattr(series.rolling(50), roll_func)()
      assert isinstance(result, Series)
      tm.assert_almost_equal(
          result.iloc[-1], compare_func(series[-50:])
      )
  
file_path: pandas/pandas/tests/window/test_rolling_skew_kurt.py
imports: from functools import partial
  import numpy
  import pytest
  from pandas import DataFrame, Series, concat, isna, notna
  import pandas._testing
  from pandas.tseries import offsets
label_desc: Use image node_id 1 for calling a global function with example usage: test_series(series, sp_func, roll_func) without return types