code: def test_passes(self):
      # long message includes the original error message with a custom one
      self.longMessage = True
      # construct what we expect when passes aren't involved
      test_rhots = list()
      model = self.class_(id2word=dictionary, chunksize=1, num_topics=2)
  
      def final_rhot(model):
          return pow(
              model.offset + (1 * model.num_updates) / model.chunksize,
              -model.decay,
          )
  
      # generate 5 updates to test rhot on
      for x in range(5):
          model.update(self.corpus)
          test_rhots.append(final_rhot(model))
  
      for passes in [1, 5, 10, 50, 100]:
          model = self.class_(
              id2word=dictionary,
              chunksize=1,
              num_topics=2,
              passes=passes,
          )
          self.assertEqual(final_rhot(model), 1.0)
          # make sure the rhot matches the test after each update
          for test_rhot in test_rhots:
              model.update(self.corpus)
  
              msg = ", ".join(
                  str(x)
                  for x in [
                      passes,
                      model.num_updates,
                      model.state.numdocs,
                  ]
              )
              self.assertAlmostEqual(
                  final_rhot(model), test_rhot, msg=msg
              )
  
          self.assertEqual(
              model.state.numdocs, len(corpus) * len(test_rhots)
          )
          self.assertEqual(
              model.num_updates, len(corpus) * len(test_rhots)
          )
  
imports: import logging
  import numbers
  import os
  import unittest
  import copy
  import numpy
  from numpy.testing import assert_allclose
  from gensim.corpora import mmcorpus, Dictionary
  from gensim.models import ldamodel, ldamulticore
  from gensim import matutils, utils
  from gensim.test import basetmtests
  from gensim.test.utils import datapath, get_tmpfile, common_texts
label_desc: Use image node_id 12 for calling the TestLdaModel obj's underlying member method code with example usage: obj.test_passes() and returns: pow