code: def test_acc(self) -> None:
      acc = cflearn.api.make_metric("acc")
      labels = np.array([1, 1, 1, 1]).reshape([4, 1])
      p1 = np.array([-0.2, -0.1, 0.1, 0.2]).reshape([4, 1])
      p2 = np.array(
          [[-0.2, -0.1, 0.1, 0.2], [0.0, 0.0, 0.0, 0.0]]
      ).reshape([4, 2])
      p3 = np.array(
          [
              [-0.2, -0.1, 0.2],
              [-0.1, 0.1, 0.2],
              [-0.2, 0.2, 0.1],
              [0.1, 0.2, -0.1],
          ]
      )
      self.assertAlmostEqual(_get_score(acc, p1, labels), 0.5)
      self.assertAlmostEqual(_get_score(acc, p2, labels), 0.5)
      self.assertAlmostEqual(_get_score(acc, p3, labels), 0.5)
  
file_path: carefree-learn/tests/test_metrics.py
imports: import cflearn
  import unittest
  import numpy
  from cflearn.schema import IMetric
  from cflearn.constants import LABEL_KEY
  from cflearn.constants import PREDICTIONS_KEY
label_desc: Use image node_id 1 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_acc() without return types