code: def test_transform(self):
      # create the transformation model
      # HACK; set fixed seed so that we always get the same random matrix (and can compare against expected results)
      np.random.seed(13)
      model = rpmodel.RpModel(self.corpus, num_topics=2)
  
      # transform one document
      doc = list(self.corpus)[0]
      transformed = model[doc]
      vec = matutils.sparse2full(
          transformed, 2
      )  # convert to dense vector, for easier equality tests
  
      expected = np.array([-0.70710677, 0.70710677])
      self.assertTrue(np.allclose(vec, expected))
  
file_path: gensim/gensim/test/test_rpmodel.py
imports: import logging
  import unittest
  import numpy
  from gensim.corpora.mmcorpus import MmCorpus
  from gensim.models import rpmodel
  from gensim import matutils
  from gensim.test.utils import datapath, get_tmpfile
label_desc: Use image node_id 2 for calling the TestRpModel obj's underlying member method code with example usage: obj.test_transform() without return types