code: def prepare_bubble_chart(
      disparity_df,
      metrics_list,
      attribute,
      fairness_threshold,
      chart_height,
      chart_width,
      chart_default_sizes,
      accessibility_mode,
  ):
      metrics = __sanitize_metrics(metrics_list)
  
      __validate_data_inputs(
          disparity_df, metrics, attribute, fairness_threshold
      )
  
      ## Calculate default chart sizes
      num_metrics = len(metrics)
  
      (chart_height, chart_width) = __calculate_default_sizes(
          chart_height, chart_width, chart_default_sizes, metrics
      )
  
      Validator.chart_size_bubble(
          chart_width, chart_height, chart_default_sizes, num_metrics
      )
  
      # GET REF GROUP
      ref_group = disparity_df.loc[
          disparity_df["attribute_name"] == attribute
      ][f"{metrics[0]}_ref_group_value"].iloc[0]
  
      plot_table = __filter_df(disparity_df, metrics, attribute)
  
      # GLOBAL CHART MECHANICS
      ## SCALES: COLOR, BUBBLE SIZE, SHAPE
      global_scales = __get_global_scales(
          plot_table,
          ref_group,
          metrics,
          chart_height,
          accessibility_mode,
      )
  
      # SELECTION
      selection = alt.selection_multi(
          empty="all", fields=["attribute_value"]
      )
  
      return (
          plot_table,
          metrics,
          ref_group,
          global_scales,
          chart_height,
          chart_width,
          selection,
      )
  
file_path: aequitas/src/aequitas/plot/commons/initializers.py
imports: import altair
  from aequitas.plot.commons import validators
  from aequitas.plot.commons import scales
  from aequitas.plot.commons.helpers import to_list, calculate_chart_size_from_elements
label_desc: Use image node_id 6 for calling a global function with example usage: prepare_bubble_chart(disparity_df, metrics_list, attribute, fairness_threshold, chart_height, chart_width, chart_default_sizes, accessibility_mode) and returns: plot_table,  metrics,  ref_group,  global_scales,  chart_height,  chart_width,  selection