code: def __draw_threshold_bands(
      threshold_df, scales, accessibility_mode=False
  ):
      """Draws fairness threshold bands: regions painted red where the metric value is above the defined fairness threshold."""
  
      fill_color = (
          Threshold_Band.color_accessible
          if accessibility_mode
          else Threshold_Band.color
      )
  
      lower_threshold_band = (
          alt.Chart(threshold_df)
          .mark_rect(
              fill=fill_color,
              opacity=Threshold_Band.opacity,
              tooltip=None,
          )
          .encode(
              y=alt.Y(
                  field="metric",
                  type="nominal",
                  scale=scales["y"],
                  axis=no_axis(),
              ),
              x=alt.X("lower_threshold_value:Q", scale=scales["x"]),
              x2="lower_end:Q",
          )
      )
  
      upper_threshold_band = (
          alt.Chart(threshold_df)
          .mark_rect(
              fill=fill_color,
              opacity=Threshold_Band.opacity,
              tooltip=None,
          )
          .encode(
              y=alt.Y(
                  field="metric",
                  type="nominal",
                  scale=scales["y"],
                  axis=no_axis(),
              ),
              x=alt.X("upper_threshold_value:Q", scale=scales["x"]),
              x2="upper_end:Q"
              # scales["x"]["range"][1]
              # Replicating the approach of the lower_threshold_band doesn't work...
          )
      )
  
      return lower_threshold_band + upper_threshold_band
  
imports: import altair
  import pandas
  from aequitas.plot.commons.helpers import no_axis, transform_ratio, get_chart_metadata
  from aequitas.plot.commons.legend import draw_legend
  from aequitas.plot.commons.scales import get_chart_size_range
  from aequitas.plot.commons.tooltips import get_tooltip_text_group_size, get_tooltip_text_disparity_explanation
  from aequitas.plot.commons.style.classes import Metric_Axis, Axis, Threshold_Band, Threshold_Rule, Annotation, Bubble, Rule, Chart_Title
  from aequitas.plot.commons.style.sizes import Metric_Chart
  from aequitas.plot.commons.style.text import FONT, FONT_SIZE_SMALL
  from aequitas.plot.commons import initializers
  from aequitas.plot.commons import labels
label_desc: Use image node_id 6 for calling a global function with example usage: __draw_threshold_bands(threshold_df, scales, accessibility_mode) and returns: unknown