class_docstr: Class for building and working with Online Hierarchical Navigable Small World index.
class_docstr_tok: ["Class","for","building","and","working","with","Online","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.
  
  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",".","Returns","--","--","--","-","neighbors",":","list","of","tuples","(","id",",","distance",")"]
code: def get_nearest(self, query, top_size=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.
  
      Returns
      -------
      neighbors : list of tuples (id, distance)
      """
      return self._online_index._get_nearest_neighbors(query, top_size)
  
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 3 for calling the OnlineHnsw obj's underlying member method code with example usage: obj.get_nearest(query, top_size) and returns: self