code: def test_average():
      y_targ = np.array([0, 0, 0, 1, 1, 1, 1, 1, 2, 2])
      y_pred = np.array([0, 1, 1, 0, 1, 1, 2, 2, 2, 2])
  
      y = accuracy_score(y_targ, y_pred, method="average")
      assert_almost_equal(y, float(2) / 3, decimal=4)
  
imports: import numpy
  from numpy.testing import assert_almost_equal
  from mlxtend.evaluate import accuracy_score
label_desc: Use image node_id 5 for calling a global function with example usage: test_average() without return types