code: def test_spearmanr():
      x = np.random.randn(100)
      y = np.random.randn(100)
  
      scipy_expected = stats.spearmanr(x, y)
      r = dist.spearmanr(x, y)
      assert_array_almost_equal(r, 1 - scipy_expected.correlation)
  
imports: import pytest
  import numpy
  from numpy.testing import assert_array_equal, assert_array_almost_equal
  import pynndescent.distances
  import pynndescent.sparse
  from scipy import stats
  from scipy.sparse import csr_matrix
  from scipy.version import full_version
  from sklearn.metrics import pairwise_distances
  from sklearn.neighbors import BallTree
  from sklearn.preprocessing import normalize
label_desc: Use image node_id 9 for calling a global function with example usage: test_spearmanr() without return types