class_docstr: Plotting object allows for visualization of absolute group bias metrics and
  relative disparities calculated by Aequitas Group(), Bias(), and Fairness()
  class instances.
docstr: This function plots treemaps of disparities indicated by config file
  
  :param data_table: output of bias.get_disparity, or fairness.get_fairness
      functions
  :param plot_fcn: Plotting function to use to plot individual disparity
      or fairness treemaps in grid
  :param attributes: which attributes to plot against. Must be specified
      if no metrics specified.
  :param metrics: which metric(s) to plot, or 'all.' MUST be specified if
      no attributes specified. If this value is null, the following
      absolute metrics/ related disparity measures will be plotted against
      specified attributes:
          - Predicted Prevalence (pprev),
          - Predicted Positive Rate (ppr),
          - False Discovery Rate (fdr),
          - False Omission Rate (for),
          - False Positive Rate (fpr),
          - False Negative Rate (fnr)
  :param fillzeros: Whether null values should be filled with zeros. Default
      is True.
  :param title: Whether to display a title on each plot. Default is True.
  :param label_dict: Optional dictionary of label replacements. Default is
      None.
  :param highlight_fairness: Whether to highlight treemaps by disparity
      magnitude, or by related fairness determination.
  :param show_figure: Whether to show figure (plt.show()). Default is True.
  :param min_group_size: Minimum proportion of total group size (all data)
      a population group must meet in order to be included in visualization
  :param significance_alpha: statistical significance level. Used to
      determine visual representation of significance (number of
      asterisks on treemap).
  
  :return: Returns a figure
code: def _plot_multiple_treemaps(
      self,
      data_table,
      plot_fcn,
      attributes=None,
      metrics=None,
      fillzeros=True,
      title=True,
      label_dict=None,
      highlight_fairness=False,
      show_figure=True,
      min_group_size=None,
      significance_alpha=0.05,
  ):
      """
      This function plots treemaps of disparities indicated by config file
  
      :param data_table: output of bias.get_disparity, or fairness.get_fairness
          functions
      :param plot_fcn: Plotting function to use to plot individual disparity
          or fairness treemaps in grid
      :param attributes: which attributes to plot against. Must be specified
          if no metrics specified.
      :param metrics: which metric(s) to plot, or 'all.' MUST be specified if
          no attributes specified. If this value is null, the following
          absolute metrics/ related disparity measures will be plotted against
          specified attributes:
              - Predicted Prevalence (pprev),
              - Predicted Positive Rate (ppr),
              - False Discovery Rate (fdr),
              - False Omission Rate (for),
              - False Positive Rate (fpr),
              - False Negative Rate (fnr)
      :param fillzeros: Whether null values should be filled with zeros. Default
          is True.
      :param title: Whether to display a title on each plot. Default is True.
      :param label_dict: Optional dictionary of label replacements. Default is
          None.
      :param highlight_fairness: Whether to highlight treemaps by disparity
          magnitude, or by related fairness determination.
      :param show_figure: Whether to show figure (plt.show()). Default is True.
      :param min_group_size: Minimum proportion of total group size (all data)
          a population group must meet in order to be included in visualization
      :param significance_alpha: statistical significance level. Used to
          determine visual representation of significance (number of
          asterisks on treemap).
  
      :return: Returns a figure
      """
      model_id = self._check_model_id(
          df=data_table, method_table_name="data_table"
      )
  
      if fillzeros:
          data_table = data_table.fillna(0)
  
      if all(v is None for v in [attributes, metrics]):
          raise ValueError(
              "One of the following parameters must be specified: "
              "'attribute', 'metrics'."
          )
  
      if attributes:
          if not metrics:
              metrics = [
                  abs_m
                  for abs_m in self.key_metrics
                  if abs_m in data_table.columns
              ]
  
          #         metrics = list(set(self.input_group_metrics) &
          # set(data_table.columns))
          elif metrics == "all":
              all_abs_metrics = [
                  "tpr_disparity",
                  "tnr_disparity",
                  "for_disparity",
                  "fdr_disparity",
                  "fpr_disparity",
                  "fnr_disparity",
                  "npv_disparity",
                  "precision_disparity",
                  "ppr_disparity",
                  "pprev_disparity",
              ]
              metrics = [
                  abs_m
                  for abs_m in all_abs_metrics
                  if abs_m in data_table.columns
              ]
  
          viz_title = f"DISPARITY METRICS BY {(', ').join(list(map(lambda x:x.upper(), attributes)))}"
  
      elif not attributes:
          attributes = list(data_table.attribute_name.unique())
          if metrics == "all":
              all_disparities = [
                  "tpr_disparity",
                  "tnr_disparity",
                  "for_disparity",
                  "fdr_disparity",
                  "fpr_disparity",
                  "fnr_disparity",
                  "npv_disparity",
                  "precision_disparity",
                  "ppr_disparity",
                  "pprev_disparity",
              ]
              metrics = [
                  disparity
                  for disparity in all_disparities
                  if disparity in data_table.columns
              ]
          viz_title = (
              f"{(', ').join(map(lambda x:x.upper(), metrics))} "
              f"ACROSS ATTRIBUTES"
          )
  
      num_metrics = len(attributes) * len(metrics)
      if num_metrics > 2:
          ncols = 3
      else:
          ncols = num_metrics
  
      rows = math.ceil(num_metrics / ncols)
      if ncols == 1 or (num_metrics % ncols == 0):
          axes_to_remove = 0
      else:
          axes_to_remove = ncols - (num_metrics % ncols)
  
      if not (0 < rows <= num_metrics):
          raise ValueError(
              "Plot must have at least one row. Please update number of columns"
              " ('ncols'), the list of metrics to be plotted ('metrics'), or "
              "the list of attributes to plot disparity metrics across."
          )
      if not (0 < ncols <= num_metrics):
          raise ValueError(
              "Plot must have at least one column, and no more columns than "
              "plots. Please update number of columns ('ncols'), the list of "
              "metrics to be plotted ('metrics'), or the list of attributes to "
              "plot disparity metrics across."
          )
  
      total_plot_width = 25
  
      fig, axs = plt.subplots(
          nrows=rows,
          ncols=ncols,
          figsize=(total_plot_width, 8 * rows),
          gridspec_kw={"wspace": 0.025, "hspace": 0.5},
          subplot_kw={"aspect": "equal"},
      )
  
      if highlight_fairness:
          mapping = None
      else:
          aq_palette = sns.diverging_palette(
              225, 35, sep=10, as_cmap=True
          )
  
          norm = matplotlib.colors.Normalize(vmin=0, vmax=2)
          mapping = matplotlib.cm.ScalarMappable(
              norm=norm, cmap=aq_palette
          )
  
      # set a different metric to be plotted in each subplot
      ax_col = 0
      ax_row = 0
  
      for group_metric in metrics:
          for attr in attributes:
              if (ax_col >= ncols) and ((ax_col + 1) % ncols) == 1:
                  ax_row += 1
                  ax_col = 0
  
              if num_metrics == 1:
                  current_subplot = axs
  
              elif (num_metrics > 1) and (rows == 1):
                  current_subplot = axs[ax_col]
  
              elif (num_metrics > 1) and (ncols == 1):
                  current_subplot = axs[ax_row]
                  ax_row += 1
              else:
                  current_subplot = axs[ax_row, ax_col]
  
              plot_fcn(
                  data_table,
                  group_metric=group_metric,
                  attribute_name=attr,
                  color_mapping=mapping,
                  ax=current_subplot,
                  fig=fig,
                  title=title,
                  label_dict=label_dict,
                  highlight_fairness=highlight_fairness,
                  min_group_size=min_group_size,
                  significance_alpha=significance_alpha,
              )
  
              ax_col += 1
  
      # disable axes not being used
      if axes_to_remove > 0:
          for i in np.arange(axes_to_remove):
              axs[-1, -(i + 1)].axis("off")
  
      plt.suptitle(f"{viz_title}", fontsize=25, fontweight="bold")
  
      # fig.tight_layout()
  
      if rows > 2:
          fig.subplots_adjust(top=0.95)
      else:
          fig.subplots_adjust(top=0.90)
  
      if show_figure:
          plt.show()
      return fig
  
imports: import logging
  import math
  import numpy
  import collections
  import seaborn
  import matplotlib.pyplot
  import matplotlib.colors
  import matplotlib.cm
  from aequitas import squarify_flipped
label_desc: Use image node_id 20 for calling the Plot obj's underlying member method code with example usage: obj._plot_multiple_treemaps(data_table, plot_fcn, attributes, metrics, fillzeros, title, label_dict, highlight_fairness, show_figure, min_group_size, significance_alpha) and returns: fig