code: def __init__(self, y_true, y_pred, protected, cutoff):
      assert len(y_true) == len(y_pred) == len(protected)
      assert isinstance(cutoff, dict)
  
      subgroups = np.unique(protected)
      sub_dict = {}
  
      for sub in subgroups:
          sub_indexes = np.where(protected == sub)
          sub_y_true = y_true[sub_indexes]
          sub_y_pred = y_pred[sub_indexes]
  
          sub_dict[sub] = ConfusionMatrix(
              sub_y_true, sub_y_pred, cutoff.get(sub)
          )
      self.sub_dict = sub_dict
  
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 1 to create a new SubgroupConfusionMatrix object  with example: obj = SubgroupConfusionMatrix(y_true, y_pred, protected, cutoff)