code: def test_apply_static_traffic_light_bounds():
      datastore = {"to_profile": {"asc_numbers": get_test_data()}}
  
      conf = {"monitoring_rules": {"*_pull": [7, 4, -4, -7]}}
  
      m1 = ApplyFunc(
          apply_to_key="to_profile",
          features=["asc_numbers"],
          metrics=["a", "b"],
      )
      m1.add_apply_func(np.std, suffix="_std")
      m1.add_apply_func(np.mean, suffix="_mean")
  
      m2 = ApplyFunc(
          apply_to_key="to_profile", features=["asc_numbers"]
      )
      m2.add_apply_func(
          pull,
          suffix="_pull",
          axis=1,
          suffix_mean="_mean",
          suffix_std="_std",
      )
  
      m5 = StaticBounds(
          read_key="to_profile",
          store_key="tl",
          rules=conf["monitoring_rules"],
          suffix_mean="_mean",
          suffix_std="_std",
      )
  
      pipeline = Pipeline(modules=[m1, m2, m5])
      datastore = pipeline.transform(datastore)
  
      assert "tl" in datastore
      test_data = datastore["tl"]
      assert "asc_numbers" in test_data
      p = test_data["asc_numbers"]
  
      tlcs = [
          "traffic_light_a_red_high",
          "traffic_light_a_yellow_high",
          "traffic_light_a_yellow_low",
          "traffic_light_a_red_low",
          "traffic_light_b_red_high",
          "traffic_light_b_yellow_high",
          "traffic_light_b_yellow_low",
          "traffic_light_b_red_low",
      ]
      for c in tlcs:
          assert c in p.columns
  
      np.testing.assert_almost_equal(
          p["traffic_light_a_red_high"].values[1], 251.5624903
      )
      np.testing.assert_almost_equal(
          p["traffic_light_a_yellow_high"].values[1], 164.96428019
      )
      np.testing.assert_almost_equal(
          p["traffic_light_a_yellow_low"].values[1], -65.96428019
      )
      np.testing.assert_almost_equal(
          p["traffic_light_a_red_low"].values[1], -152.56249033
      )
      np.testing.assert_almost_equal(
          p["traffic_light_b_red_high"].values[1], 5.0
      )
      np.testing.assert_almost_equal(
          p["traffic_light_b_yellow_high"].values[1], 3.5
      )
      np.testing.assert_almost_equal(
          p["traffic_light_b_yellow_low"].values[1], -0.5
      )
      np.testing.assert_almost_equal(
          p["traffic_light_b_red_low"].values[1], -2.0
      )
  
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 5 for calling a global function with example usage: test_apply_static_traffic_light_bounds() without return types