code: def test_confusion_matrix(self):
      y = turicreate.SArray([1, 1, 0, 1, 1, 0, 1])
      yhat = turicreate.SArray([0, 1, 0, 0, 1, 1, 0])
  
      res = turicreate.toolkits.evaluation.confusion_matrix(y, yhat)
      res = res.sort(["predicted_label", "target_label"])["count"]
      self.assertTrue((res == turicreate.SArray([1, 3, 1, 2])).all())
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import turicreate
  from turicreate.toolkits._main import ToolkitError
  import math
  from numpy import inf
  import numpy
label_desc: Use image node_id 9 for calling the MetricsTest obj's underlying member method code with example usage: obj.test_confusion_matrix() without return types