code: def test_too_many_values(self):
      expected_msg = "Must have no more than two unique y values"
      expected_msg_no_pos = "If pos_label is not specified, values must be from {0, 1} or {-1, 1}"
      with pytest.raises(ValueError) as e0:
          _get_labels_for_confusion_matrix([0, 1, 2], None)
      # Note that while the following error message should be deterministic
      # from a user PoV, either message is helpful
      assert str(e0.value) in {expected_msg, expected_msg_no_pos}
      # In the following, only one error is possible
      with pytest.raises(ValueError) as e1:
          _get_labels_for_confusion_matrix(["a", "b", "c"], "a")
      assert str(e1.value) == expected_msg
  
imports: import numpy
  import pytest
  import sklearn.metrics
  import fairlearn.metrics
  from fairlearn.metrics._base_metrics import _get_labels_for_confusion_matrix
label_desc: Use image node_id 7 for calling the TestGetLabelsForConfusionMatrix obj's underlying member method code with example usage: obj.test_too_many_values() without return types