code: def test_rolling_window_funcs():
      datastore = {"to_profile": {"asc_numbers": get_test_data()}}
  
      m = ApplyFunc(
          apply_to_key="to_profile",
          features=["asc_numbers"],
          metrics=["a", "b"],
      )
      m.add_apply_func(
          rolling_mean,
          suffix="_rolling_3_mean",
          entire=True,
          window=3,
          shift=0,
      )
      m.add_apply_func(
          rolling_lr,
          suffix="_rolling_10_slope",
          entire=True,
          window=10,
          index=0,
      )
      m.add_apply_func(
          rolling_lr,
          suffix="_rolling_10_intercept",
          entire=True,
          window=10,
          index=1,
      )
  
      datastore = Pipeline(modules=[m]).transform(datastore)
      feature_df = datastore["to_profile"]["asc_numbers"]
  
      np.testing.assert_array_almost_equal(
          feature_df["a_rolling_3_mean"].tolist(),
          [np.nan] * 2 + list(range(1, 99)),
      )
      np.testing.assert_array_almost_equal(
          feature_df["a_rolling_10_slope"].tolist(),
          [np.nan] * 9 + [1.0] * 91,
      )
      np.testing.assert_array_almost_equal(
          feature_df["a_rolling_10_intercept"].tolist(),
          [np.nan] * 9 + [float(i) for i in range(0, 91)],
      )
  
file_path: popmon/tests/popmon/alerting/test_apply_tl_bounds.py
imports: import numpy
  import pandas
  import pytest
  from popmon.alerting import ComputeTLBounds, DynamicBounds, StaticBounds, TrafficLightAlerts, pull_bounds, traffic_light
  from popmon.analysis.apply_func import ApplyFunc
  from popmon.analysis.functions import expanding_mean, expanding_std, pull, rolling_lr, rolling_mean
  from popmon.base import Pipeline
  from popmon.config import Settings
  from popmon.visualization.section_generator import SectionGenerator
label_desc: Use image node_id 6 for calling a global function with example usage: test_rolling_window_funcs() without return types