code: def test_nonscalar_metric(self):
      msg = (
          "Error calling numpy.quantiles. Most likely due to a metric returning a"
          " non-scalar result"
      )
      with pytest.raises(ValueError) as execInfo:
          _ = MetricFrame(
              metrics=skm.confusion_matrix,
              y_true=y_t,
              y_pred=y_p,
              sensitive_features=g_1,
              n_boot=N_BOOTSTRAP,
              ci_quantiles=[0.5],
              random_state=20231020,
          )
      assert execInfo.value.args[0] == msg
      assert (
          execInfo.value.__cause__.args[0]
          == "The truth value of an array with more than one element is ambiguous."
          " Use a.any() or a.all()"
      )
  
imports: import numpy
  import pytest
  import sklearn.metrics
  from fairlearn.metrics import MetricFrame, count
  from .data_for_test import g_1, g_2, y_p, y_t
label_desc: Use image node_id 10 for calling the TestErrors obj's underlying member method code with example usage: obj.test_nonscalar_metric() without return types