class_docstr: Class for building, loading and working with Hierarchical Navigable Small World index.
class_docstr_tok: ["Class","for","building",",","loading","and","working","with","Hierarchical","Navigable","Small","World","index","."]
docstr: Get approximate nearest neighbors for query from index.
  
  Parameters
  ----------
  query : list or numpy.ndarray
      Vector for which nearest neighbors should be found.
  
  top_size : int
      Required number of neighbors.
  
  search_neighborhood_size : int
      Search neighborhood size for ANN-search.
      Higher values improve search quality in expense of search time.
      It should be equal or greater than top_size.
  
  distance_calc_limit : int (default=0)
      Limit of distance calculation.
      To guarantee satisfactory search time at the expense of quality.
      0 is equivalent to no limit.
  
  Returns
  -------
  neighbors : list of tuples (id, distance)
docstr_tok: ["Get","approximate","nearest","neighbors","for","query","from","index",".","Parameters","--","--","--","--","--","query",":","list","or","numpy.ndarray","Vector","for","which","nearest","neighbors","should","be","found",".","top_size",":","int","Required","number","of","neighbors",".","search_neighborhood_size",":","int","Search","neighborhood","size","for","ANN-search",".","Higher","values","improve","search","quality","in","expense","of","search","time",".","It","should","be","equal","or","greater","than","top_size",".","distance_calc_limit",":","int","(","default=0",")","Limit","of","distance","calculation",".","To","guarantee","satisfactory","search","time","at","the","expense","of","quality",".","0","is","equivalent","to","no","limit",".","Returns","--","--","--","-","neighbors",":","list","of","tuples","(","id",",","distance",")"]
code: def get_nearest(
      self,
      query,
      top_size,
      search_neighborhood_size,
      distance_calc_limit=0,
  ):
      """
      Get approximate nearest neighbors for query from index.
  
      Parameters
      ----------
      query : list or numpy.ndarray
          Vector for which nearest neighbors should be found.
  
      top_size : int
          Required number of neighbors.
  
      search_neighborhood_size : int
          Search neighborhood size for ANN-search.
          Higher values improve search quality in expense of search time.
          It should be equal or greater than top_size.
  
      distance_calc_limit : int (default=0)
          Limit of distance calculation.
          To guarantee satisfactory search time at the expense of quality.
          0 is equivalent to no limit.
  
      Returns
      -------
      neighbors : list of tuples (id, distance)
      """
      self._check_index()
      return self._index._get_nearest(
          query, top_size, search_neighborhood_size, distance_calc_limit
      )
  
imports: import sys
  import os
  from six import iteritems
  from enum import IntEnum
  from contextlib import contextmanager
  import json
label_desc: Use image node_id 7 for calling the Hnsw obj's underlying member method code with example usage: obj.get_nearest(query, top_size, search_neighborhood_size, distance_calc_limit) and returns: self