code: def test_acc_2d_label():
      # label maybe provided in 2d arrays in custom data iterator
      pred = mx.np.array(
          [
              [0.3, 0.7],
              [0, 1.0],
              [0.4, 0.6],
              [0.8, 0.2],
              [0.3, 0.5],
              [0.6, 0.4],
          ]
      )
      label = mx.np.array([[0, 1, 1], [1, 0, 1]])
      metric = mx.gluon.metric.create("acc")
      metric.update([label], [pred])
      _, acc = metric.get()
      expected_acc = (
          np.argmax(pred, axis=1).asnumpy() == label.asnumpy().ravel()
      ).sum() / float(label.asnumpy().ravel().size)
      np.testing.assert_almost_equal(acc, expected_acc)
  
imports: import mxnet
  from mxnet.test_utils import use_np
  import numpy
  import scipy
  from scipy.stats import pearsonr
  import json
  import math
  from common import xfail_when_nonstandard_decimal_separator
  from copy import deepcopy
label_desc: Use image node_id 5 for calling a global function with example usage: test_acc_2d_label() without return types