code: def plot_traffic_lights_overview(
      feature, data, metrics: list[str], labels: list[str]
  ):
      colors: defaultdict[str, dict[str, list[str]]] = defaultdict(dict)
      color_map = ["g", "y", "r"]
      for c1, metric in enumerate(metrics):
          for c2, label in enumerate(labels):
              colors[metric][label] = [color_map[data[c1][c2]]]
  
      return templates_env(
          "table.html",
          feature=feature,
          metrics=metrics,
          labels=labels,
          data=colors,
          links=True,
      )
  
imports: from __future__ import annotations
  import datetime
  import json
  import logging
  import math
  import warnings
  from collections import defaultdict
  import numpy
  import pandas
  import plotly.express
  import plotly.graph_objects
  from popmon.resources import templates_env
label_desc: Use image node_id 6 for calling a global function with example usage: plot_traffic_lights_overview(feature, data, metrics, labels) and returns: templates_env