code: def __draw_threshold_rules(
      threshold_df, scales, chart_height, accessibility_mode=False
  ):
      """Draws threshold rules: red lines that mark the defined fairness_threshold in the chart."""
      stroke_color = (
          Threshold_Rule.stroke_accessible
          if accessibility_mode
          else Threshold_Rule.stroke
      )
  
      threshold_rule = (
          alt.Chart(threshold_df)
          .mark_rule(
              stroke=stroke_color,
              opacity=Threshold_Rule.opacity,
              strokeWidth=Threshold_Rule.stroke_width,
              tooltip=None,
          )
          .encode(
              y=alt.value(Disparity_Chart.padding_y * chart_height),
              y2=alt.value(
                  (1 - Disparity_Chart.padding_y) * chart_height
              ),
          )
      )
  
      lower_threshold_rule = threshold_rule.encode(
          x=alt.X("min:Q", scale=scales["x"]),
      )
      upper_threshold_rule = threshold_rule.encode(
          x=alt.X("max:Q", scale=scales["x"]),
      )
  
      return lower_threshold_rule + upper_threshold_rule
  
imports: import math
  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, Annotation, Reference_Rule, Threshold_Rule, Threshold_Band, Bubble, Chart_Title
  from aequitas.plot.commons.style.text import FONT, FONT_SIZE_SMALL
  from aequitas.plot.commons.style.sizes import Disparity_Chart
  from aequitas.plot.commons import initializers
  from aequitas.plot.commons import labels
label_desc: Use image node_id 7 for calling a global function with example usage: __draw_threshold_rules(threshold_df, scales, chart_height, accessibility_mode) and returns: unknown