code: def test_sparse_nn_descent_neighbor_accuracy(sparse_nn_data, seed):
      knn_indices, _ = NNDescent(
          sparse_nn_data, "euclidean", n_neighbors=20, random_state=None
      )._neighbor_graph
  
      tree = KDTree(sparse_nn_data.toarray())
      true_indices = tree.query(
          sparse_nn_data.toarray(), 10, return_distance=False
      )
  
      num_correct = 0.0
      for i in range(sparse_nn_data.shape[0]):
          num_correct += np.sum(
              np.in1d(true_indices[i], knn_indices[i])
          )
  
      percent_correct = num_correct / (sparse_nn_data.shape[0] * 10)
      assert (
          percent_correct >= 0.85
      ), "Sparse NN-descent did not get 95% accuracy on nearest neighbors"
  
imports: import os
  import io
  import re
  import pytest
  from contextlib import redirect_stdout
  import numpy
  from sklearn.neighbors import KDTree
  from sklearn.neighbors import NearestNeighbors
  from sklearn.preprocessing import normalize
  import pickle
  import joblib
  import scipy
  from pynndescent import NNDescent, PyNNDescentTransformer
label_desc: Use image node_id 3 for calling a global function with example usage: test_sparse_nn_descent_neighbor_accuracy(sparse_nn_data, seed) without return types