docstr: Test storing/loading the entire model.
docstr_tok: ["Test","storing\/loading","the","entire","model","."]
code: def test_persistence(self):
      """Test storing/loading the entire model."""
      tmpf = get_tmpfile("transmat-en-it.pkl")
  
      model = translation_matrix.TranslationMatrix(
          self.source_word_vec, self.target_word_vec, self.word_pairs
      )
      model.train(self.word_pairs)
      model.save(tmpf)
  
      loaded_model = translation_matrix.TranslationMatrix.load(tmpf)
      self.assertTrue(
          np.allclose(
              model.translation_matrix, loaded_model.translation_matrix
          )
      )
  
imports: from collections import namedtuple
  import unittest
  import logging
  import numpy
  import pytest
  from scipy.spatial.distance import cosine
  from gensim.models.doc2vec import Doc2Vec
  from gensim import utils
  from gensim.models import translation_matrix
  from gensim.models import KeyedVectors
  from gensim.test.utils import datapath, get_tmpfile
label_desc: Use image node_id 3 for calling the TestTranslationMatrix obj's underlying member method code with example usage: obj.test_persistence() without return types