code: def _check_model(m):
      """Model sanity checks. Run after everything has been completely initialized."""
      if m.wv.vector_size != m.wv.vectors_ngrams.shape[1]:
          raise ValueError(
              "mismatch between vector size in model params (%s) and model vectors (%s)"
              % (
                  m.wv.vector_size,
                  m.wv.vectors_ngrams,
              )
          )
  
      if hasattr(m, "syn1neg") and m.syn1neg is not None:
          if m.wv.vector_size != m.syn1neg.shape[1]:
              raise ValueError(
                  "mismatch between vector size in model params (%s) and trainables (%s)"
                  % (
                      m.wv.vector_size,
                      m.wv.vectors_ngrams,
                  )
              )
  
      if len(m.wv) != m.nwords:
          raise ValueError(
              "mismatch between final vocab size (%s words), and expected number of words (%s words)"
              % (
                  len(m.wv),
                  m.nwords,
              )
          )
  
      if len(m.wv) != m.vocab_size:
          # expecting to log this warning only for pretrained french vector, wiki.fr
          logger.warning(
              "mismatch between final vocab size (%s words), and expected vocab size (%s words)",
              len(m.wv),
              m.vocab_size,
          )
  
imports: import logging
  import numpy
  from numpy import ones, vstack, float32
  import gensim.models._fasttext_bin
  from gensim.models.word2vec import Word2Vec
  from gensim.models.keyedvectors import KeyedVectors, prep_vectors
  from gensim import utils
  from gensim.utils import deprecated
  from gensim.models import keyedvectors
label_desc: Use image node_id 5 for calling a global function with example usage: _check_model(m) without return types