code: def get_group_group_report(
      group_value_df,
      attribute,
      fairness_measures,
      fairness_measures_depend,
  ):
      # defining how to display stuff
      names = {
          "attribute_value": "Attribute Value",
          "group_size_pct": "Group Size Ratio",
      }
      def_cols = ["attribute_value", "group_size_pct"]
      for par, disp in fairness_measures_depend.items():
          if par in fairness_measures:
              def_cols.append(disp.replace("_disparity", ""))
      aux_df = group_value_df.loc[
          group_value_df["attribute_name"] == attribute
      ]
      aux_df = aux_df[def_cols]
      aux_df = aux_df.round(2)
      aux_df = aux_df.astype(str)
      # fixing the same order of columns every time!
      cols_order = [
          "attribute_value",
          "group_size_pct",
          "ppr",
          "pprev",
          "fdr",
          "fpr",
          "for",
          "fnr",
      ]
      new_order = [col for col in cols_order if col in aux_df.columns]
      aux_df = aux_df[new_order]
      map = {}
      for col in aux_df.columns:
          if col in names:
              colstr = names[col]
          else:
              colstr = col.upper()
          map[col] = colstr  # + ' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
      aux_df = aux_df.rename(index=str, columns=map)
      group_group = tabulate(
          aux_df,
          headers="keys",
          tablefmt="pipe",
          showindex="never",
          numalign="left",
      )
      return group_group
  
imports: import datetime
  import logging
  import pandas
  from markdown2 import markdown
  from tabulate import tabulate
label_desc: Use image node_id 6 for calling a global function with example usage: get_group_group_report(group_value_df, attribute, fairness_measures, fairness_measures_depend) and returns: group_group