code: def test_persisting(self):
      elda = self.get_elda()
      elda_mem_unfriendly = self.get_elda_mem_unfriendly()
  
      fname = get_tmpfile("gensim_models_ensemblelda")
      elda.save(fname)
      loaded_elda = EnsembleLda.load(fname)
      # storing the ensemble without memory_friendy_ttda
      elda_mem_unfriendly.save(fname)
      loaded_elda_mem_unfriendly = EnsembleLda.load(fname)
  
      # topic_model_class will be lazy loaded and should be None first
      assert loaded_elda.topic_model_class is None
  
      # was it stored and loaded correctly?
      # memory friendly.
      loaded_elda_representation = (
          loaded_elda.generate_gensim_representation()
      )
  
      # generating the representation also lazily loads the topic_model_class
      assert loaded_elda.topic_model_class == LdaModel
  
      topics = loaded_elda_representation.get_topics()
      ttda = loaded_elda.ttda
      amatrix = loaded_elda.asymmetric_distance_matrix
      np.testing.assert_allclose(elda.get_topics(), topics, rtol=RTOL)
      np.testing.assert_allclose(elda.ttda, ttda, rtol=RTOL)
      np.testing.assert_allclose(
          elda.asymmetric_distance_matrix, amatrix, rtol=RTOL
      )
  
      expected_clustering_results = elda.cluster_model.results
      loaded_clustering_results = loaded_elda.cluster_model.results
  
      self.assert_clustering_results_equal(
          expected_clustering_results, loaded_clustering_results
      )
  
      # memory unfriendly
      loaded_elda_mem_unfriendly_representation = (
          loaded_elda_mem_unfriendly.generate_gensim_representation()
      )
      topics = loaded_elda_mem_unfriendly_representation.get_topics()
      np.testing.assert_allclose(elda.get_topics(), topics, rtol=RTOL)
  
imports: import os
  import logging
  import unittest
  import numpy
  from copy import deepcopy
  import pytest
  from gensim.models import EnsembleLda, LdaMulticore, LdaModel
  from gensim.test.utils import datapath, get_tmpfile, common_corpus, common_dictionary
label_desc: Use image node_id 15 for calling the TestEnsembleLda obj's underlying member method code with example usage: obj.test_persisting() without return types