code: def __get_position_scales(
      plot_table, metrics, fairness_threshold, chart_height, chart_width
  ):
      """Computes the scales for x and y encodings to be used in the disparity bubble chart."""
  
      position_scales = dict()
  
      # DISPARITIES SCALE
      # RANGE
      x_range = get_chart_size_range(
          chart_width, Disparity_Chart.padding_x
      )
  
      # DOMAIN
      # Get max absolute disparity
      scaled_disparities_col_names = [
          f"{metric}_disparity_scaled" for metric in metrics
      ]
  
      def max_column(x):
          return max(x.min(), x.max(), key=abs)
  
      max_disparities = plot_table[scaled_disparities_col_names].apply(
          max_column, axis=1
      )
      abs_max_disparity = abs(max_column(max_disparities))
  
      # If fairness_threshold is defined, get max between threshold and max absolute disparity
      if fairness_threshold is not None:
          x_domain_limit = math.ceil(
              max(abs_max_disparity, fairness_threshold)
          )
      else:
          x_domain_limit = math.ceil(abs_max_disparity)
  
      x_domain = [-x_domain_limit, x_domain_limit]
      position_scales["x"] = alt.Scale(domain=x_domain, range=x_range)
  
      # METRICS SCALE
      y_range = get_chart_size_range(
          chart_height, Disparity_Chart.padding_y
      )
      if chart_height < 300:
          y_range[0] = 30
      y_domain = [metric.upper() for metric in metrics]
      position_scales["y"] = alt.Scale(domain=y_domain, range=y_range)
  
      return position_scales
  
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 1 for calling a global function with example usage: __get_position_scales(plot_table, metrics, fairness_threshold, chart_height, chart_width) and returns: position_scales, max