code: def test_one_dimensional_data(nn_data, metric):
      nnd = NNDescent(
          nn_data[200:, :1],
          metric=metric,
          n_neighbors=20,
          random_state=None,
          tree_init=False,
      )
      nnd.prepare()
  
      knn_indices, _ = nnd.query(nn_data[:200, :1], k=10, epsilon=0.2)
  
      true_nnd = NearestNeighbors(metric=metric).fit(nn_data[200:, :1])
      true_indices = true_nnd.kneighbors(
          nn_data[:200, :1], 10, return_distance=False
      )
  
      num_correct = 0.0
      for i in range(true_indices.shape[0]):
          num_correct += np.sum(
              np.in1d(true_indices[i], knn_indices[i])
          )
  
      percent_correct = num_correct / (true_indices.shape[0] * 10)
      assert percent_correct >= 0.95, (
          "NN-descent query 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 30 for calling a global function with example usage: test_one_dimensional_data(nn_data, metric) without return types