code: def test_shrinkage_threshold_decoded_y():
      clf = NearestCentroid(shrink_threshold=0.01)
      y_ind = np.asarray(y)
      y_ind[y_ind == -1] = 0
      clf.fit(X, y_ind)
      centroid_encoded = clf.centroids_
      clf.fit(X, y)
      assert_array_equal(centroid_encoded, clf.centroids_)
  
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 6 for calling a global function with example usage: test_shrinkage_threshold_decoded_y() without return types