class_docstr: Evaluate the traffic light alerts
  
  Steps:
  
  - Generate static traffic light bounds by expanding the wildcarded monitoring rules
  - Apply them to profiled test statistics data
docstr: Initialize an instance of TrafficLightBounds.
  
  :param str read_key: key of input data to read from data store, only used to extract feature list.
  :param str store_key: results of traffic light bounds after applied to input data, to store in data store.
  :param dict rules: input dict of wildcard traffic light bounds => key is feature:metric
                                and value is bounds
  :param str expanded_rules_key: store key of expanded monitoring rules to store in data store,
                                            eg. these can be used for plotting. (optional)
docstr_tok: ["Initialize","an","instance","of","TrafficLightBounds",".",":","param","str","read_key",":","key","of","input","data","to","read","from","data","store",",","only","used","to","extract","feature","list",".",":","param","str","store_key",":","results","of","traffic","light","bounds","after","applied","to","input","data",",","to","store","in","data","store",".",":","param","dict","rules",":","input","dict","of","wildcard","traffic","light","bounds","=",">","key","is","feature",":","metric","and","value","is","bounds",":","param","str","expanded_rules_key",":","store","key","of","expanded","monitoring","rules","to","store","in","data","store",",","eg",".","these","can","be","used","for","plotting",".","(","optional",")"]
code: def __init__(
      self, read_key, store_key, rules, expanded_rules_key: str = ""
  ) -> None:
      """Initialize an instance of TrafficLightBounds.
  
      :param str read_key: key of input data to read from data store, only used to extract feature list.
      :param str store_key: results of traffic light bounds after applied to input data, to store in data store.
      :param dict rules: input dict of wildcard traffic light bounds => key is feature:metric
                                    and value is bounds
      :param str expanded_rules_key: store key of expanded monitoring rules to store in data store,
                                                eg. these can be used for plotting. (optional)
      """
      self.read_key = read_key
      apply_funcs_key = f"{read_key}__{store_key}"
      if len(expanded_rules_key) > 0:
          apply_funcs_key += f"__{expanded_rules_key}"
  
      # generate static traffic light bounds by expanding the wildcarded monitoring rules
      expand_bounds = ComputeTLBounds(
          read_key=read_key,
          store_key=expanded_rules_key,
          prefix="",
          apply_funcs_key=apply_funcs_key,
          monitoring_rules=rules,
      )
      # Apply them to profiled test statistics data
      apply_bounds = ApplyFunc(
          apply_to_key=read_key,
          assign_to_key=store_key,
          apply_funcs_key=apply_funcs_key,
      )
  
      super().__init__(modules=[expand_bounds, apply_bounds])
  
imports: from __future__ import annotations
  import copy
  import fnmatch
  from collections import defaultdict
  from typing import Any
  import numpy
  import pandas
  from popmon.analysis.apply_func import ApplyFunc
  from popmon.base import Module, Pipeline
label_desc: Use image node_id 1 to create a new TrafficLightAlerts object from inherited base classes: Pipeline with example: obj = TrafficLightAlerts(read_key, store_key, rules, expanded_rules_key)