code: def test_angular_nn_descent_neighbor_accuracy(nn_data, seed):
      knn_indices, _ = NNDescent(
          nn_data,
          "cosine",
          {},
          10,
          random_state=np.random.RandomState(seed),
      )._neighbor_graph
  
      angular_data = normalize(nn_data, norm="l2")
      tree = KDTree(angular_data)
      true_indices = tree.query(angular_data, 10, return_distance=False)
  
      num_correct = 0.0
      for i in range(nn_data.shape[0]):
          num_correct += np.sum(
              np.in1d(true_indices[i], knn_indices[i])
          )
  
      percent_correct = num_correct / (nn_data.shape[0] * 10)
      assert (
          percent_correct >= 0.98
      ), "NN-descent did not get 99% 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 2 for calling a global function with example usage: test_angular_nn_descent_neighbor_accuracy(nn_data, seed) without return types