code: def fast_knn_indices(X, n_neighbors):
      """A fast computation of knn indices.
  
      Parameters
      ----------
      X: array of shape (n_samples, n_features)
          The input data to compute the k-neighbor indices of.
  
      n_neighbors: int
          The number of nearest neighbors to compute for each sample in ``X``.
  
      Returns
      -------
      knn_indices: array of shape (n_samples, n_neighbors)
          The indices on the ``n_neighbors`` closest points in the dataset.
      """
      knn_indices = np.empty((X.shape[0], n_neighbors), dtype=np.int32)
      for row in numba.prange(X.shape[0]):
          # v = np.argsort(X[row])  # Need to call argsort this way for numba
          v = X[row].argsort(kind="quicksort")
          v = v[:n_neighbors]
          knn_indices[row] = v
      return knn_indices
  
file_path: umap/umap/utils.py
imports: import time
  from warnings import warn
  import numpy
  import numba
  from sklearn.utils.validation import check_is_fitted
  import scipy.sparse
label_desc: Use image node_id 1 for calling a global function with example usage: fast_knn_indices(X, n_neighbors) and returns: knn_indices