code: def test_conf_mat(dummy_classifier, mock_run):
      _ = mock_run(settings={"mode": "offline"})
      *_, y_test, y_pred, y_probas = dummy_classifier
      conf_mat_using_probs = confusion_matrix(
          probs=y_probas, y_true=y_test
      )
      conf_mat_using_preds = confusion_matrix(
          preds=y_pred, y_true=y_test, title="New title"
      )
      assert conf_mat_using_probs.table.data[0] == [
          "Class_1",
          "Class_1",
          0.0,
      ]
      assert (
          conf_mat_using_probs.table.data[0]
          == conf_mat_using_preds.table.data[0]
      )
      assert conf_mat_using_preds.string_fields["title"] == "New title"
  
file_path: wandb/tests/pytest_tests/unit_tests/test_plot.py
imports: import pytest
  from sklearn.naive_bayes import MultinomialNB
  from wandb.plot import confusion_matrix, line_series, pr_curve, roc_curve
label_desc: Use image node_id 4 for calling a global function with example usage: test_conf_mat(dummy_classifier, mock_run) without return types