code: def testWeighted(self):
      labels = np.arange(5, dtype=np.int32)
      predictions = np.arange(5, dtype=np.int32)
      weights = np.arange(5, dtype=np.int32)
  
      truth = np.asarray(
          [
              [0, 0, 0, 0, 0],
              [0, 1, 0, 0, 0],
              [0, 0, 2, 0, 0],
              [0, 0, 0, 3, 0],
              [0, 0, 0, 0, 4],
          ],
          dtype=np.int32,
      )
  
      self._testConfMatrix(
          labels=labels,
          predictions=predictions,
          weights=weights,
          truth=truth,
      )
  
imports: import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import confusion_matrix
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 15 for calling the ConfusionMatrixTest obj's underlying member method code with example usage: obj.testWeighted() without return types