code: def test_integration_alerting():
      datastore = {"test_data": pytest.test_comparer_df}
  
      conf = {
          "monitoring_rules": {
              "the_feature:mae": [8, 4, 2, 0.15],
              "dummy_feature:*": [0, 0, 0, 0],
              "mse": [0.2, 0.11, 0.09, 0],
              "mae": [0, 0, 0, 0],
              "*": [0, 0, 0, 0],
          }
      }
  
      ctlb = ComputeTLBounds(
          read_key="test_data",
          store_key="traffic_light_bounds",
          apply_funcs_key="traffic_light_funcs",
          ignore_features=["dummy_feature"],
          monitoring_rules=conf["monitoring_rules"],
      )
  
      atlb = ApplyFunc(
          apply_to_key=ctlb.read_key,
          assign_to_key="output_data",
          apply_funcs_key="traffic_light_funcs",
      )
  
      pipeline = Pipeline(modules=[ctlb, atlb])
      datastore = pipeline.transform(datastore)
  
      output = datastore[atlb.store_key]["the_feature"]
  
      alerts_per_color_per_date = pd.DataFrame()
      for i, color in enumerate(["green", "yellow", "red"]):
          alerts_per_color_per_date[f"n_{color}"] = (
              output.values == i
          ).sum(axis=1)
  
      alerts_total_per_color = alerts_per_color_per_date.sum(axis=0)
  
      assert alerts_total_per_color["n_green"] == 5
      assert alerts_total_per_color["n_yellow"] == 1
      assert alerts_total_per_color["n_red"] == 4
  
imports: import pandas
  import pytest
  from popmon.alerting import AlertsSummary, ComputeTLBounds, traffic_light_summary
  from popmon.analysis.apply_func import ApplyFunc
  from popmon.base import Pipeline
label_desc: Use image node_id 1 for calling a global function with example usage: test_integration_alerting() without return types