code: def test_1m_1sf_0cf():
      target = metrics.MetricFrame(
          metrics={"confusion_matrix": skm.confusion_matrix},
          y_true=y_t,
          y_pred=y_p,
          sensitive_features=g_1,
      )
  
      overall = skm.confusion_matrix(y_t, y_p)
      assert np.array_equal(target.overall["confusion_matrix"], overall)
  
      for g in np.unique(g_1):
          mask = g_1 == g
          expected = skm.confusion_matrix(y_t[mask], y_p[mask])
          actual = target.by_group["confusion_matrix"][g]
          assert np.array_equal(actual, expected)
  
file_path: fairlearn/test/unit/metrics/test_metricframe_nonscalar.py
imports: import functools
  import numpy
  import sklearn.metrics
  import fairlearn.metrics
  from .data_for_test import g_1, g_2, y_p, y_t
label_desc: Use image node_id 1 for calling a global function with example usage: test_1m_1sf_0cf() without return types