code: def test_pandas_confusion_cm_binarize(self):
      y_true = [
          "rabbit",
          "cat",
          "rabbit",
          "rabbit",
          "cat",
          "dog",
          "dog",
          "rabbit",
          "rabbit",
          "cat",
          "dog",
          "rabbit",
      ]
      y_pred = [
          "cat",
          "cat",
          "rabbit",
          "dog",
          "cat",
          "rabbit",
          "dog",
          "cat",
          "rabbit",
          "cat",
          "rabbit",
          "rabbit",
      ]
  
      cm = ConfusionMatrix(y_true, y_pred)
      assert isinstance(
          cm, pdml.confusion_matrix.LabeledConfusionMatrix
      )
  
      print("Confusion matrix:\n%s" % cm)
      select = ["cat", "dog"]
  
      print("Binarize with %s" % select)
      binary_cm = cm.binarize(select)
  
      print("Binary confusion matrix:\n%s" % binary_cm)
  
      assert cm.sum() == binary_cm.sum()
  
imports: import pytest
  import matplotlib
  import numpy
  import pandas
  import pandas_ml.util.testing
  import pandas_ml
  from pandas_ml import ConfusionMatrix
  from collections import OrderedDict
label_desc: Use image node_id 6 for calling the TestConfusionMatrix obj's underlying member method code with example usage: obj.test_pandas_confusion_cm_binarize() without return types