code: def test_iris_shrinkage():
      # Check consistency on dataset iris, when using shrinkage.
      for metric in ("euclidean", "cosine"):
          for shrink_threshold in [None, 0.1, 0.5]:
              clf = NearestCentroid(
                  metric=metric, shrink_threshold=shrink_threshold
              )
              clf = clf.fit(iris.data, iris.target)
              score = np.mean(clf.predict(iris.data) == iris.target)
              assert score > 0.8, "Failed with score = " + str(score)
  
file_path: scikit-learn/sklearn/neighbors/tests/test_nearest_centroid.py
imports: import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from sklearn import datasets
  from sklearn.neighbors import NearestCentroid
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 3 for calling a global function with example usage: test_iris_shrinkage() without return types