code: def query(self, query, k):
      timer = utils.Timer(
          f"Finding {k} nearest neighbors in existing embedding using exact search...",
          self.verbose,
      )
      timer.__enter__()
  
      # The nearest neighbor ranking for cosine distance is the same as for
      # euclidean distance on normalized data
      if self.metric == "cosine":
          effective_data = query.copy()
          effective_data = (
              effective_data
              / np.linalg.norm(effective_data, axis=1)[:, None]
          )
      else:
          effective_data = query
  
      distances, indices = self.index.kneighbors(
          effective_data, n_neighbors=k
      )
  
      # If using cosine distance, the computed distances will be wrong and
      # need to be recomputed
      if self.metric == "cosine":
          if self.__data is None:
              raise RuntimeError(
                  "The original data was unavailable when querying cosine "
                  "distance. Did you change the distance metric after "
                  "building the index? Please rebuild the index using cosine "
                  "similarity."
              )
          distances = np.vstack(
              [
                  cdist(
                      np.atleast_2d(x),
                      self.__data[idx],
                      metric="cosine",
                  )
                  for x, idx in zip(query, indices)
              ]
          )
  
      timer.__exit__()
  
      return indices, distances
  
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 3 for calling the Sklearn obj's underlying member method code with example usage: obj.query(query, k) and returns: indices,  distances