class_docstr: Use a precomputed distance matrix to construct the KNNG.
  
  Parameters
  ----------
  distance_matrix: np.ndarray
      A square, symmetric, and contain only poistive values.
class_docstr_tok: ["Use","a","precomputed","distance","matrix","to","construct","the","KNNG",".","Parameters","--","--","--","--","--","distance_matrix",":","np.ndarray","A","square",",","symmetric",",","and","contain","only","poistive","values","."]
code: def __init__(self, distance_matrix, k):
      nn = neighbors.NearestNeighbors(metric="precomputed")
      nn.fit(distance_matrix)
      self.distances, self.indices = nn.kneighbors(n_neighbors=k)
      self.n_samples = distance_matrix.shape[0]
      self.k = k
  
imports: import logging
  import os
  import warnings
  import numpy
  from scipy.spatial.distance import cdist
  from sklearn import neighbors
  from sklearn.utils import check_random_state
  from openTSNE import utils
label_desc: Use image node_id 1 to create a new PrecomputedDistanceMatrix object from inherited base classes: KNNIndex with example: obj = PrecomputedDistanceMatrix(distance_matrix, k)