code: def nn_descent_internal_high_memory_parallel(
      current_graph,
      data,
      n_neighbors,
      rng_state,
      max_candidates=50,
      dist=pynnd_dist.euclidean,
      n_iters=10,
      delta=0.001,
      verbose=False,
  ):
      n_vertices = data.shape[0]
      block_size = 16384
      n_blocks = n_vertices // block_size
      n_threads = numba.get_num_threads()
  
      in_graph = [
          set(current_graph[0][i].astype(np.int64))
          for i in range(current_graph[0].shape[0])
      ]
  
      for n in range(n_iters):
          if verbose:
              print("\t", n + 1, " / ", n_iters)
  
          (
              new_candidate_neighbors,
              old_candidate_neighbors,
          ) = new_build_candidates(
              current_graph, max_candidates, rng_state, n_threads
          )
  
          c = 0
          for i in range(n_blocks + 1):
              block_start = i * block_size
              block_end = min(n_vertices, (i + 1) * block_size)
  
              new_candidate_block = new_candidate_neighbors[
                  block_start:block_end
              ]
              old_candidate_block = old_candidate_neighbors[
                  block_start:block_end
              ]
              dist_thresholds = current_graph[1][:, 0]
  
              updates = generate_graph_updates(
                  new_candidate_block,
                  old_candidate_block,
                  dist_thresholds,
                  data,
                  dist,
              )
  
              c += apply_graph_updates_high_memory(
                  current_graph, updates, in_graph
              )
  
          if c <= delta * n_neighbors * data.shape[0]:
              if verbose:
                  print(
                      "\tStopping threshold met -- exiting after",
                      n + 1,
                      "iterations",
                  )
              return
  
imports: from warnings import warn
  import numba
  import numpy
  from sklearn.utils import check_random_state, check_array
  from sklearn.preprocessing import normalize
  from sklearn.base import BaseEstimator, TransformerMixin
  from scipy.sparse import csr_matrix, coo_matrix, isspmatrix_csr, vstack, issparse
  import heapq
  import pynndescent.sparse
  import pynndescent.sparse_nndescent
  import pynndescent.distances
  from pynndescent.utils import tau_rand_int, tau_rand, make_heap, deheap_sort, new_build_candidates, ts, simple_heap_push, checked_flagged_heap_push, has_been_visited, mark_visited, apply_graph_updates_high_memory, apply_graph_updates_low_memory, initalize_heap_from_graph_indices, initalize_heap_from_graph_indices_and_distances, sparse_initalize_heap_from_graph_indices
  from pynndescent.rp_trees import make_forest, rptree_leaf_array, convert_tree_format, FlatTree, denumbaify_tree, renumbaify_tree, select_side, sparse_select_side, score_linked_tree
label_desc: Use image node_id 9 for calling a global function with example usage: nn_descent_internal_high_memory_parallel(current_graph, data, n_neighbors, rng_state, max_candidates, dist, n_iters, delta, verbose) without return types