code: def _confusion_matrix(targets, predictions):
      """Helper function to produce a confusion matrix after properly formatting `predictions`
  
      Parameters
      ----------
      targets: Array-like
          The target/expected output labels for each of the given `predictions`
      predictions: Array-like
          The predicted values corresponding to each of the elements in `targets`
  
      Returns
      -------
      Array-like
          A confusion matrix for the given `targets` and `predictions`
      """
      return sk_confusion_matrix(
          targets, get_clean_prediction(targets, predictions)
      )
  
file_path: hyperparameter_hunter/hyperparameter_hunter/callbacks/recipes.py
imports: from hyperparameter_hunter.callbacks.bases import lambda_callback
  from hyperparameter_hunter.data.data_chunks.target_chunks import TrainTargetChunk
  from hyperparameter_hunter.metrics import get_clean_prediction
  from copy import deepcopy
  import numpy
  from typing import List, Optional
  from sklearn.metrics import confusion_matrix
label_desc: Use image node_id 3 for calling a global function with example usage: _confusion_matrix(targets, predictions) and returns: sk_confusion_matrix