code: def test_neighbor_local_neighbor_accuracy(
      aligned_iris, aligned_iris_model
  ):
      data, target = aligned_iris
      for i, slice in enumerate(data):
          data_dmat = pairwise_distances(slice)
          true_nn = np.argsort(data_dmat, axis=1)[:, :10]
          embd_dmat = pairwise_distances(
              aligned_iris_model.embeddings_[i]
          )
          embd_nn = np.argsort(embd_dmat, axis=1)[:, :10]
          assert nn_accuracy(true_nn, embd_nn) >= 0.65
  
file_path: umap/umap/tests/test_aligned_umap.py
imports: import pytest
  from umap import AlignedUMAP
  from sklearn.metrics import pairwise_distances
  from sklearn.cluster import KMeans
  import numpy
  from sklearn.metrics import adjusted_rand_score
label_desc: Use image node_id 2 for calling a global function with example usage: test_neighbor_local_neighbor_accuracy(aligned_iris, aligned_iris_model) without return types