docstr: Store the input-hidden weight matrix in the same format used by the original C word2vec-tool.
  
  Parameters
  ----------
  fname : str
      The file path used to save the vectors in.
  doctag_vec : bool, optional
      Indicates whether to store document vectors.
  word_vec : bool, optional
      Indicates whether to store word vectors.
  prefix : str, optional
      Uniquely identifies doctags from word vocab, and avoids collision in case of repeated string in doctag
      and word vocab.
  fvocab : str, optional
      Optional file path used to save the vocabulary.
  binary : bool, optional
      If True, the data will be saved in binary word2vec format, otherwise - will be saved in plain text.
code: def save_word2vec_format(
      self,
      fname,
      doctag_vec=False,
      word_vec=True,
      prefix="*dt_",
      fvocab=None,
      binary=False,
  ):
      """Store the input-hidden weight matrix in the same format used by the original C word2vec-tool.
  
      Parameters
      ----------
      fname : str
          The file path used to save the vectors in.
      doctag_vec : bool, optional
          Indicates whether to store document vectors.
      word_vec : bool, optional
          Indicates whether to store word vectors.
      prefix : str, optional
          Uniquely identifies doctags from word vocab, and avoids collision in case of repeated string in doctag
          and word vocab.
      fvocab : str, optional
          Optional file path used to save the vocabulary.
      binary : bool, optional
          If True, the data will be saved in binary word2vec format, otherwise - will be saved in plain text.
  
      """
      total_vec = None
      # save word vectors
      if word_vec:
          if doctag_vec:
              total_vec = len(self.wv) + len(self.dv)
          self.wv.save_word2vec_format(fname, fvocab, binary, total_vec)
      # save document vectors
      if doctag_vec:
          write_header = True
          append = False
          if word_vec:
              # simply appending to existing file
              write_header = False
              append = True
          self.dv.save_word2vec_format(
              fname,
              prefix=prefix,
              fvocab=fvocab,
              binary=binary,
              write_header=write_header,
              append=append,
              sort_attr="doc_count",
          )
  
imports: import logging
  import os
  from collections import namedtuple, defaultdict
  from collections.abc import Iterable
  from timeit import default_timer
  from dataclasses import dataclass
  from numpy import zeros, float32, vstack, integer, dtype
  import numpy
  from gensim import utils, matutils
  from gensim.utils import deprecated
  from gensim.models import Word2Vec, FAST_VERSION
  from gensim.models.keyedvectors import KeyedVectors, pseudorandom_weak_vector
label_desc: Use image node_id 18 for calling the Doc2Vec obj's underlying member method code with example usage: obj.save_word2vec_format(fname, doctag_vec, word_vec, prefix, fvocab, binary) without return types