code: def test_acc():
      pred = mx.np.array([[0.3, 0.7], [0, 1.0], [0.4, 0.6]])
      label = mx.np.array([0, 1, 1])
      metric = mx.gluon.metric.create("acc")
      metric.update([label], [pred])
      _, acc = metric.get()
      expected_acc = (
          np.argmax(pred, axis=1) == label
      ).sum().item() / label.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 4 for calling a global function with example usage: test_acc() without return types