code: def _confusion_matrix_helper(y_true, y_pred, classes=None):
      """Helper function for computing confusion matrix.
  
      :param y_true: True labels.
      :type y_true: numpy.ndarray
      :param y_pred: Predicted labels.
      :type y_pred: numpy.ndarray
      :param classes: List of classes.
      :type classes: list
      :return: Tuple of true positive, false positive, false negative
               and true negative.
      :rtype: Tuple[int, int, int, int]
      """
      tp, fp, fn, tn = confusion_matrix(
          y_true, y_pred, labels=classes
      ).ravel()
      return tp, fp, fn, tn
  
file_path: responsible-ai-toolbox/erroranalysis/erroranalysis/_internal/metrics.py
imports: import numpy
  from sklearn.metrics import accuracy_score, confusion_matrix, f1_score, mean_absolute_error, mean_squared_error, median_absolute_error, precision_score, r2_score, recall_score
  from erroranalysis._internal.constants import Metrics, ModelTask, f1_metrics, precision_metrics, recall_metrics
label_desc: Use image node_id 1 for calling a global function with example usage: _confusion_matrix_helper(y_true, y_pred, classes) and returns: tp,  fp,  fn,  tn