code: def _metric_ratios_2_df(fobject):
      """
      Converts GroupFairnessClassification
      to elegant DataFrame with 4 columns (subgroup, metric, score, label)
      """
  
      data = fobject.result
      data = data.stack(dropna=False)
      data = data.reset_index()
      data.columns = ["subgroup", "metric", "score"]
      data = data.loc[
          data.metric.isin(["TPR", "ACC", "PPV", "FPR", "STP"])
      ]
      data = data.loc[data.subgroup != fobject.privileged]
      data.score -= 1
  
      data["label"] = np.repeat(fobject.label, data.shape[0])
  
      return data
  
imports: from copy import deepcopy
  import numpy
  import pandas
  from .None import checks
  from ...None import _global_checks
  from ..._explainer import helper
  from ...model_explanations._model_performance import utils
label_desc: Use image node_id 5 for calling a global function with example usage: _metric_ratios_2_df(fobject) and returns: data