code: def test_deduplicated_data_behaves_normally(seed, cosine_hang_data):
      data = np.unique(cosine_hang_data, axis=0)
      data = data[~np.all(data == 0, axis=1)]
      data = data[:1000]
  
      n_neighbors = 10
      knn_indices, _ = NNDescent(
          data,
          "cosine",
          {},
          n_neighbors,
          random_state=np.random.RandomState(seed),
          n_trees=20,
      )._neighbor_graph
  
      for i in range(data.shape[0]):
          assert len(knn_indices[i]) == len(
              np.unique(knn_indices[i])
          ), "Duplicate graph_indices in knn graph"
  
      angular_data = normalize(data, norm="l2")
      tree = KDTree(angular_data)
      true_indices = tree.query(
          angular_data, n_neighbors, return_distance=False
      )
  
      num_correct = 0
      for i in range(data.shape[0]):
          num_correct += np.sum(
              np.in1d(true_indices[i], knn_indices[i])
          )
  
      proportion_correct = num_correct / (data.shape[0] * n_neighbors)
      assert (
          proportion_correct >= 0.95
      ), "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 13 for calling a global function with example usage: test_deduplicated_data_behaves_normally(seed, cosine_hang_data) without return types