class_docstr: Expand traffic light boundaries over all features and metrics
  
  The module extracts the monitoring rules for the traffic light
  bounds for specific features/metrics and if those are not found -
  monitoring rules are extracted from the wildcard rules which are
  meant to be generic. Then bounds can be stored as either raw
  values or as directly calculated values on the statistics of the data.
docstr: Initialize an instance of TrafficLightBounds module.
  
  :param str read_key: key of input data to read from datastore
  :param str store_key: key of output data to store in datastore (optional)
  :param dict monitoring_rules: dict of traffic light bounds => key is feature:metric and value is bounds
  :param list features: features of data frames to pick up from input data (optional)
  :param list ignore_features: list of features to ignore (optional)
  :param str apply_funcs_key: key of to-be-applied traffic light functions in data to store (optional)
  :param func: traffic light function to apply (optional)
  :param bool metrics_wide: if true, select wide set of metrics from columns. default is false (optional)
  :param str prefix: prefix for traffic light variables. default is ``tl_`` (optional)
  :param str suffix: suffix for traffic light variables. default is '' (optional)
  :param bool entire: if True, apply function to the entire feature's dataframe of metrics (optional)
  :param kwargs: residual kwargs are passed as kwargs to 'func' (dict, optional)
docstr_tok: ["Initialize","an","instance","of","TrafficLightBounds","module",".",":","param","str","read_key",":","key","of","input","data","to","read","from","datastore",":","param","str","store_key",":","key","of","output","data","to","store","in","datastore","(","optional",")",":","param","dict","monitoring_rules",":","dict","of","traffic","light","bounds","=",">","key","is","feature",":","metric","and","value","is","bounds",":","param","list","features",":","features","of","data","frames","to","pick","up","from","input","data","(","optional",")",":","param","list","ignore_features",":","list","of","features","to","ignore","(","optional",")",":","param","str","apply_funcs_key",":","key","of","to-be-applied","traffic","light","functions","in","data","to","store","(","optional",")",":","param","func",":","traffic","light","function","to","apply","(","optional",")",":","param","bool","metrics_wide",":","if","true",",","select","wide","set","of","metrics","from","columns",".","default","is","false","(","optional",")",":","param","str","prefix",":","prefix","for","traffic","light","variables",".","default","is","``","tl_","``","(","optional",")",":","param","str","suffix",":","suffix","for","traffic","light","variables",".","default","is","``","(","optional",")",":","param","bool","entire",":","if","True",",","apply","function","to","the","entire","feature","'s","dataframe","of","metrics","(","optional",")",":","param","kwargs",":","residual","kwargs","are","passed","as","kwargs","to","'func","'","(","dict",",","optional",")"]
code: def __init__(
      self,
      read_key,
      monitoring_rules=None,
      store_key: str = "",
      features=None,
      ignore_features=None,
      apply_funcs_key: str = "",
      func=None,
      metrics_wide: bool = False,
      prefix: str = "traffic_light_",
      suffix: str = "",
      entire: bool = False,
      **kwargs,
  ) -> None:
      """Initialize an instance of TrafficLightBounds module.
  
      :param str read_key: key of input data to read from datastore
      :param str store_key: key of output data to store in datastore (optional)
      :param dict monitoring_rules: dict of traffic light bounds => key is feature:metric and value is bounds
      :param list features: features of data frames to pick up from input data (optional)
      :param list ignore_features: list of features to ignore (optional)
      :param str apply_funcs_key: key of to-be-applied traffic light functions in data to store (optional)
      :param func: traffic light function to apply (optional)
      :param bool metrics_wide: if true, select wide set of metrics from columns. default is false (optional)
      :param str prefix: prefix for traffic light variables. default is ``tl_`` (optional)
      :param str suffix: suffix for traffic light variables. default is '' (optional)
      :param bool entire: if True, apply function to the entire feature's dataframe of metrics (optional)
      :param kwargs: residual kwargs are passed as kwargs to 'func' (dict, optional)
      """
  
      super().__init__()
      self.read_key = read_key
      self.store_key = store_key
      self.apply_funcs_key = apply_funcs_key
  
      self.monitoring_rules = monitoring_rules or {}
      self.features = features or []
      self.ignore_features = ignore_features or []
      self.traffic_lights = {}
      self.traffic_light_funcs = []
      self.traffic_light_func = (
          func if func is not None else traffic_light
      )
      self.metrics_wide = metrics_wide
      self.prefix = prefix
      self.suffix = suffix
      self.entire = entire
      self.kwargs = copy.copy(kwargs)
  
      if not callable(self.traffic_light_func):
          raise TypeError("supplied function must be callable object")
  
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 ComputeTLBounds object from inherited base classes: Module with example: obj = ComputeTLBounds(read_key, monitoring_rules, store_key, features, ignore_features, apply_funcs_key, func, metrics_wide, prefix, suffix, entire)