class_docstr: This class allows the use of `Annoy <https://github.com/spotify/annoy>`_ for fast (approximate)
  vector retrieval in `most_similar()` calls of
  :class:`~gensim.models.word2vec.Word2Vec`, :class:`~gensim.models.doc2vec.Doc2Vec`,
  :class:`~gensim.models.fasttext.FastText` and :class:`~gensim.models.keyedvectors.Word2VecKeyedVectors` models.
class_docstr_tok: ["This","class","allows","the","use","of","`","Annoy","<","https",":","\/\/github.com\/spotify\/annoy",">","`","_","for","fast","(","approximate",")","vector","retrieval","in","`","most_similar","(",")","`","calls","of",":","class",":","`","~gensim.models.word2vec.Word2Vec","`",",",":","class",":","`","~gensim.models.doc2vec.Doc2Vec","`",",",":","class",":","`","~gensim.models.fasttext.FastText","`","and",":","class",":","`","~gensim.models.keyedvectors.Word2VecKeyedVectors","`","models","."]
code: def _build_from_model(self, vectors, labels, num_features):
      try:
          from annoy import AnnoyIndex
      except ImportError:
          raise _NOANNOY
  
      index = AnnoyIndex(num_features, metric="angular")
  
      for vector_num, vector in enumerate(vectors):
          index.add_item(vector_num, vector)
  
      index.build(self.num_trees)
      self.index = index
      self.labels = labels
  
file_path: gensim/gensim/similarities/annoy.py
imports: from __future__ import absolute_import
  import os
  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 4 for calling the AnnoyIndexer obj's underlying member method code with example usage: obj._build_from_model(vectors, labels, num_features) without return types