code: def test_confusion_matrix_metric(
      self,
      y_true,
      y_pred,
      input_type,
      average,
      expected,
      metrics,
      vocab=None,
      pos_label=1,
  ):
      confusion_matrix = _classification.ConfusionMatrixAggFn(
          input_type=input_type,
          average=average,
          vocab=vocab,
          pos_label=pos_label,
          metrics=metrics,
      )
      np.testing.assert_allclose(
          expected, confusion_matrix(y_true, y_pred), atol=1e-6
      )
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from tensorflow_model_analysis.experimental.metrics.aggregates import _classification
label_desc: Use image node_id 3 for calling the ClassificationTest obj's underlying member method code with example usage: obj.test_confusion_matrix_metric(y_true, y_pred, input_type, average, expected, metrics, vocab, pos_label) without return types