code: def test_traffic_light_summary():
      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"],
          prefix="tl_",
      )
  
      atlb = ApplyFunc(
          apply_to_key=ctlb.read_key,
          assign_to_key="output_data",
          apply_funcs_key="traffic_light_funcs",
      )
  
      tls = ApplyFunc(
          apply_to_key="output_data",
          apply_funcs=[
              {"func": traffic_light_summary, "axis": 1, "suffix": ""}
          ],
          assign_to_key="alerts",
      )
  
      pipeline = Pipeline(modules=[ctlb, atlb, tls])
      datastore = pipeline.transform(datastore)
  
      output = datastore["alerts"]["the_feature"]
  
      assert output["n_green"].values[-1] == 1
      assert output["n_yellow"].values[-1] == 0
      assert output["n_red"].values[-1] == 1
  
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 2 for calling a global function with example usage: test_traffic_light_summary() without return types