code: def test_traffic_light():
      assert traffic_light(2.2, red_high=2.0, yellow_high=0.8) == 2
      assert traffic_light(1.7, red_high=2.0, yellow_high=0.8) == 1
      assert traffic_light(0.5, red_high=2.0, yellow_high=0.8) == 0
  
      with pytest.raises(ValueError):
          traffic_light(0.5, red_high=1.0, yellow_high=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 2 for calling a global function with example usage: test_traffic_light() without return types