class_docstr: This class allows to use `NMSLIB <https://github.com/nmslib/nmslib>`_ as indexer for `most_similar` method
  from :class:`~gensim.models.word2vec.Word2Vec`, :class:`~gensim.models.doc2vec.Doc2Vec`,
  :class:`~gensim.models.fasttext.FastText` and :class:`~gensim.models.keyedvectors.Word2VecKeyedVectors` classes.
class_docstr_tok: ["This","class","allows","to","use","`","NMSLIB","<","https",":","\/\/github.com\/nmslib\/nmslib",">","`","_","as","indexer","for","`","most_similar","`","method","from",":","class",":","`","~gensim.models.word2vec.Word2Vec","`",",",":","class",":","`","~gensim.models.doc2vec.Doc2Vec","`",",",":","class",":","`","~gensim.models.fasttext.FastText","`","and",":","class",":","`","~gensim.models.keyedvectors.Word2VecKeyedVectors","`","classes","."]
code: def _build_from_model(self, vectors, labels):
      index = nmslib.init(method="hnsw", space="cosinesimil")
      index.addDataPointBatch(vectors)
  
      index.createIndex(self.index_params, print_progress=True)
      nmslib.setQueryTimeParams(index, self.query_time_params)
  
      self.index = index
      self.labels = labels
  
file_path: gensim/gensim/similarities/nmslib.py
imports: from __future__ import absolute_import
  import pickle
  from smart_open import open
  from gensim import utils
  from gensim.models.doc2vec import Doc2Vec
  from gensim.models.word2vec import Word2Vec
  from gensim.models.fasttext import FastText
  from gensim.models import KeyedVectors
label_desc: Use image node_id 7 for calling the NmslibIndexer obj's underlying member method code with example usage: obj._build_from_model(vectors, labels) without return types