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","."]
docstr: Save this NmslibIndexer instance to a file.
  
  Parameters
  ----------
  fname : str
      Path to the output file,
      will produce 2 files: `fname` - parameters and `fname`.d - :class:`~nmslib.NmslibIndex`.
  protocol : int, optional
      Protocol for pickle.
  
  Notes
  -----
  This method saves **only** the index (**the model isn't preserved**).
docstr_tok: ["Save","this","NmslibIndexer","instance","to","a","file",".","Parameters","--","--","--","--","--","fname",":","str","Path","to","the","output","file",",","will","produce","2","files",":","`","fname","`","-","parameters","and","`","fname","`",".d","-",":","class",":","`","~nmslib.NmslibIndex","`",".","protocol",":","int",",","optional","Protocol","for","pickle",".","Notes","--","--","-","This","method","saves","*","*","only","*","*","the","index","(","*","*","the","model","is","n't","preserved","*","*",")","."]
code: def save(self, fname, protocol=utils.PICKLE_PROTOCOL):
      """Save this NmslibIndexer instance to a file.
  
      Parameters
      ----------
      fname : str
          Path to the output file,
          will produce 2 files: `fname` - parameters and `fname`.d - :class:`~nmslib.NmslibIndex`.
      protocol : int, optional
          Protocol for pickle.
  
      Notes
      -----
      This method saves **only** the index (**the model isn't preserved**).
  
      """
      fname_dict = fname + ".d"
      self.index.saveIndex(fname)
      d = {
          "index_params": self.index_params,
          "query_time_params": self.query_time_params,
          "labels": self.labels,
      }
      with open(fname_dict, "wb") as fout:
          _pickle.dump(d, fout, protocol=protocol)
  
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 2 for calling the NmslibIndexer obj's underlying member method code with example usage: obj.save(fname, protocol) without return types