code: def __draw_metrics_rules(metrics, scales, concat_chart):
      """Draws an horizontal rule and the left-hand side label for each metric.
      The groups' bubbles will be positioned on this horizontal rule."""
  
      metrics_labels = [metric.upper() for metric in metrics]
  
      metrics_axis = alt.Axis(
          domain=False,
          ticks=False,
          orient="left",
          labelAngle=Metric_Axis.label_angle,
          # LabelPadding logic:
          # Spaces the labels further from the chart if they are part of a concatenated chart
          labelPadding=Metric_Axis.label_padding
          if not concat_chart
          else Metric_Axis.label_padding_concat_chart,
          title=None,
      )
  
      rules_df = pd.DataFrame(
          {
              "metric": metrics_labels,
              "x": scales["x"]["domain"][0],
              "x2": scales["x"]["domain"][1],
          }
      )
  
      metrics_rules = (
          alt.Chart(rules_df)
          .mark_rule(
              strokeWidth=Metric_Axis.stroke_width,
              stroke=Metric_Axis.stroke,
              tooltip=None,
          )
          .encode(
              y=alt.Y("metric:N", scale=scales["y"], axis=metrics_axis),
              x=alt.X("x:Q", scale=scales["x"]),
              x2="x2:Q",
          )
      )
  
      return metrics_rules
  
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 2 for calling a global function with example usage: __draw_metrics_rules(metrics, scales, concat_chart) and returns: metrics_rules