code: def test_accuracy_score(setup):
      y_pred = [0, 2, 1, 3]
      y_true = [0, 1, 2, 3]
  
      score = accuracy_score(y_true, y_pred)
      result = score.execute().fetch()
      expected = sklearn_accuracy_score(y_true, y_pred)
      assert pytest.approx(result) == expected
  
      score = accuracy_score(y_true, y_pred, normalize=False)
      result = score.execute().fetch()
      expected = sklearn_accuracy_score(y_true, y_pred, normalize=False)
      assert pytest.approx(result) == expected
  
      y_pred = np.array([[0, 1], [1, 1]])
      y_true = np.ones((2, 2))
      score = accuracy_score(y_true, y_pred)
      result = score.execute().fetch()
      expected = sklearn_accuracy_score(y_true, y_pred)
      assert pytest.approx(result) == expected
  
      sample_weight = [0.7, 0.3]
      score = accuracy_score(
          y_true, y_pred, sample_weight=sample_weight
      )
      result = score.execute().fetch()
      expected = sklearn_accuracy_score(
          y_true, y_pred, sample_weight=sample_weight
      )
      assert pytest.approx(result) == expected
  
      score = accuracy_score(
          mt.tensor(y_true),
          mt.tensor(y_pred),
          sample_weight=mt.tensor(sample_weight),
          normalize=False,
      )
      result = score.execute().fetch()
      expected = sklearn_accuracy_score(
          y_true, y_pred, sample_weight=sample_weight, normalize=False
      )
      assert pytest.approx(result) == expected
  
imports: import numpy
  import pytest
  from sklearn import datasets, svm
  from sklearn.exceptions import UndefinedMetricWarning
  from sklearn.metrics import accuracy_score
  from sklearn.utils import check_random_state
  from sklearn.utils._testing import assert_almost_equal, assert_array_equal, assert_array_almost_equal
  from sklearn.utils._mocking import MockDataFrame
  from ....None import execute, fetch
  from ....None import tensor
  from ....lib.sparse import SparseNDArray
  from ..None import accuracy_score, log_loss
  from .._classification import _check_targets, multilabel_confusion_matrix, precision_recall_fscore_support, precision_score, recall_score, f1_score, fbeta_score
label_desc: Use image node_id 3 for calling a global function with example usage: test_accuracy_score(setup) without return types