code: def __draw_population_bar(population_bar_df, metric, color_scale):
      """Draws a stacked bar of the sum of the percentage of population of the groups that obtained each result for the parity test."""
      population_bar_tooltips = [
          alt.Tooltip(
              field=f"{metric}_parity_result",
              type="nominal",
              title="Parity",
          ),
          alt.Tooltip(
              field="tooltip_group_size",
              type="nominal",
              title="Size",
          ),
          alt.Tooltip(
              field="tooltip_groups_name_size",
              type="nominal",
              title=Label.MULTIPLE_GROUPS,
          ),
      ]
  
      population_bar = (
          alt.Chart(population_bar_df)
          .transform_calculate(y_position="2.8")
          .mark_bar(size=6, stroke="white")
          .encode(
              alt.X(
                  "sum(group_size):Q", stack="normalize", axis=no_axis()
              ),
              alt.Y(
                  "y_position:Q",
                  scale=alt.Scale(domain=[3, 1]),
                  axis=no_axis(),
              ),
              alt.Color(
                  f"{metric}_parity_result:O",
                  scale=color_scale,
                  legend=None,
              ),
              tooltip=population_bar_tooltips,
          )
      )
  
      return population_bar
  
imports: import altair
  import pandas
  from aequitas.plot.commons.helpers import no_axis, transform_ratio, format_number, get_chart_metadata
  from aequitas.plot.commons.tooltips import get_tooltip_text_group_size, get_tooltip_text_disparity_explanation, get_tooltip_text_parity_test_explanation
  from aequitas.plot.commons.style.classes import Title, Subtitle, Parity_Result, Annotation, Legend
  from aequitas.plot.commons.style.text import FONT
  from aequitas.plot.commons.style.sizes import Summary_Chart
  from aequitas.plot.commons import initializers
  from aequitas.plot.commons import validators
  from aequitas.plot.commons import labels
label_desc: Use image node_id 7 for calling a global function with example usage: __draw_population_bar(population_bar_df, metric, color_scale) and returns: population_bar