code: def confusion_matrix(
      y_true=None,
      y_pred=None,
      labels=None,
      true_labels=None,
      pred_labels=None,
      normalize=False,
  ):
      """Log a confusion matrix to W&B.
  
      Confusion matrices depict the pattern of misclassifications by a model.
  
      Arguments:
          y_true: (arr) Test set labels.
          y_probas: (arr) Test set predicted probabilities.
          labels: (list) Named labels for target variable (y). Makes plots easier to
                         read by replacing target values with corresponding index.
                         For example if `labels=['dog', 'cat', 'owl']` all 0s are
                         replaced by dog, 1s by cat.
  
      Returns:
          None: To see plots, go to your W&B run page then expand the 'media' tab
                under 'auto visualizations'.
  
      Example:
      ```python
      wandb.sklearn.plot_confusion_matrix(y_true, y_probas, labels)
      ```
      """
      y_true = np.asarray(y_true)
      y_pred = np.asarray(y_pred)
  
      not_missing = utils.test_missing(y_true=y_true, y_pred=y_pred)
      correct_types = utils.test_types(y_true=y_true, y_pred=y_pred)
  
      if not_missing and correct_types:
          confusion_matrix_chart = calculate.confusion_matrix(
              y_true,
              y_pred,
              labels,
              true_labels,
              pred_labels,
              normalize,
          )
  
          wandb.log({"confusion_matrix": confusion_matrix_chart})
  
file_path: wandb/wandb/sklearn/plot/classifier.py
imports: from warnings import simplefilter
  import numpy
  from sklearn import naive_bayes
  import wandb
  import wandb.plots
  from wandb.sklearn import calculate, utils
  from .None import shared
label_desc: Use image node_id 3 for calling a global function with example usage: confusion_matrix(y_true, y_pred, labels, true_labels, pred_labels, normalize) without return types