code: def knn(indices, nn_data):  # pragma: no cover
      tree = KDTree(nn_data)
      true_indices = tree.query(nn_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], indices[i]))
      return num_correct / (nn_data.shape[0] * 10)
  
file_path: umap/umap/tests/test_umap_nn.py
imports: import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  from sklearn.neighbors import KDTree
  from sklearn.preprocessing import normalize
  from umap import distances
  from umap.umap_ import nearest_neighbors, smooth_knn_dist
label_desc: Use image node_id 3 for calling a global function with example usage: knn(indices, nn_data) and returns: unknown