code: def test_samplewise_confusion_matrix_metric(
      self,
      y_true,
      y_pred,
      metrics,
      input_type,
      expected,
      vocab=None,
  ):
      confusion_matrix = _classification.SamplewiseConfusionMatrixAggFn(
          metrics=metrics,
          input_type=input_type,
          vocab=vocab,
      )
      np.testing.assert_allclose(
          expected, confusion_matrix(y_true, y_pred)
      )
  
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 7 for calling the ClassificationTest obj's underlying member method code with example usage: obj.test_samplewise_confusion_matrix_metric(y_true, y_pred, metrics, input_type, expected, vocab) without return types