code: def format_results(df: DataFrame, decimals=3):
      def fmt(v):
          a = [f"({vv})" for vv in v]
          return np.array(a, dtype=np.object)
  
      df = df.iloc[:, 0:7]
      m = df.groupby(level=(0, 1)).mean().round(decimals).astype(str)
      s: pd.DataFrame = (
          df.groupby(level=(0, 1)).std().round(decimals).astype(str)
      )
      s = s.transform(fmt, axis=1)
      df = pd.concat((m, s), axis=1)
      df = df.iloc[:, [0, 7, 1, 8, 2, 9, 3, 10, 4, 11, 5, 12, 6, 13]]
      df.columns = pd.MultiIndex.from_product(
          (m.columns, ["mean", "std"])
      )
      return df
  
imports: import warnings
  import pickle
  from time import time
  import numpy
  import pandas
  import shap
  from aix360.algorithms.rbm import BooleanRuleCG, BRCGExplainer, FeatureBinarizer, FeatureBinarizerFromTrees, GLRMExplainer, LogisticRuleRegression
  from aix360.datasets import HELOCDataset, MEPSDataset
  from aix360.datasets.heloc_dataset import nan_preprocessing
  from pandas import DataFrame
  from sklearn.datasets import load_breast_cancer
  from sklearn.metrics import accuracy_score, f1_score, precision_score, recall_score
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 6 for calling a global function with example usage: format_results(df, decimals) and returns: df, np