code: def _classification_performance(fobject, verbose, type="accuracy"):
      tp = tn = fp = fn = 0
      for (
          key,
          val,
      ) in fobject._subgroup_confusion_matrix.sub_dict.items():
          tp += val.tp
          tn += val.tn
          fp += val.fp
          fn += val.fn
  
      if type == "accuracy":
          return utils.accuracy(tp, fp, tn, fn)
      if type == "auc":
          helper.verbose_cat(
              "Beware, that auc metric is insensitive to cutoffs",
              verbose,
          )
          return utils.auc(fobject.y_hat, fobject.y)
      if type == "recall":
          return utils.recall(tp, fp, tn, fn)
      if type == "precision":
          return utils.precision(tp, fp, tn, fn)
      if type == "f1":
          return utils.f1(tp, fp, tn, fn)
      else:
          raise TypeError(f"type '{type}' not supported")
  
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 6 for calling a global function with example usage: _classification_performance(fobject, verbose, type) and returns: utils, utils, utils, utils, utils