code: def test_report_traffic_light_bounds():
      datastore = {"to_profile": {"asc_numbers": get_test_data()}}
      settings = Settings()
      settings.monitoring.monitoring_rules = {
          "the_feature:mae": [8, 4, 2, 0.15],
          "mse": [0.2, 0.11, 0.09, 0],
          "mae": [1, 0, 0, 0],
          "*_pull": [7, 4, -4, -7],
      }
      settings.monitoring.pull_rules = {"*_pull": [7, 4, -4, -7]}
  
      m1 = ApplyFunc(
          apply_to_key="to_profile",
          features=["asc_numbers"],
          metrics=["a", "b"],
      )
      m1.add_apply_func(expanding_mean, suffix="_std", entire=True)
      m1.add_apply_func(expanding_std, suffix="_mean", entire=True)
  
      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",
      )
  
      ctlb = ComputeTLBounds(
          read_key="to_profile",
          store_key="static_tlb",
          monitoring_rules=settings.monitoring.monitoring_rules,
      )
  
      m3 = ComputeTLBounds(
          read_key="to_profile",
          monitoring_rules=settings.monitoring.pull_rules,
          apply_funcs_key="dynamic_tlb",
          func=pull_bounds,
          metrics_wide=True,
          axis=1,
      )
  
      m4 = ApplyFunc(
          apply_to_key=m3.read_key,
          assign_to_key="dtlb",
          apply_funcs_key="dynamic_tlb",
      )
  
      rg = SectionGenerator(
          read_key="to_profile",
          store_key="section",
          section_name="Profiles",
          dynamic_bounds="dtlb",
          static_bounds="static_tlb",
          settings=settings.report,
      )
  
      pipeline = Pipeline(modules=[m1, m2, ctlb, m3, m4, rg])
      datastore = pipeline.transform(datastore)
  
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 7 for calling a global function with example usage: test_report_traffic_light_bounds() without return types