code: def __create_disparity_variables(
      attribute_df, metric, fairness_threshold
  ):
      """Creates scaled disparity, parity test result & disparity explanation tooltip variables."""
      # Check if any group has a disparity of 0.
      # These values would potentially break the plots, and will raise warnings to the user.
      zero_metric_groups = attribute_df[
          attribute_df[f"{metric}_disparity"] == 0
      ]
      zero_values = zero_metric_groups["attribute_value"].values
      warning = None
      if zero_values.any():
          # If we check any disparities with value of 0, we send them as warnings.
          warning = [zero_values, metric]
      # SCALED DISPARITY VALUE
      attribute_df[f"{metric}_disparity_scaled"] = attribute_df.apply(
          lambda row: transform_ratio(row[f"{metric}_disparity"]),
          axis=1,
      )
  
      # PARITY RESULT
      attribute_df[f"{metric}_parity_result"] = attribute_df.apply(
          __get_parity_result_variable,
          metric=metric,
          fairness_threshold=fairness_threshold,
          axis=1,
      )
      return warning
  
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 13 for calling a global function with example usage: __create_disparity_variables(attribute_df, metric, fairness_threshold) and returns: warning