code: def test_resolve_embeddings(self):
      tdm = self.corpus.get_unigram_corpus().select(
          ClassPercentageCompactor(term_count=1)
      )
      embeddings_resolver = EmbeddingsResolver(tdm)
      # embeddings = TruncatedSVD(n_components=20).fit_transform(tdm.get_term_doc_mat().T).T
      # embeddings_resolver.set_embeddings(embeddings)
      embeddings_resolver = embeddings_resolver.set_embeddings(
          tdm.get_term_doc_mat()
      )
      if self.assertRaisesRegex:
          with self.assertRaisesRegex(
              Exception,
              "You have already set embeddings by running set_embeddings or set_embeddings_model.",
          ):
              embeddings_resolver.set_embeddings_model(None)
      embeddings_resolver = EmbeddingsResolver(tdm)
  
      embeddings_resolver = embeddings_resolver.set_embeddings_model(
          MockWord2Vec(tdm.get_terms())
      )
      if self.assertRaisesRegex:
          with self.assertRaisesRegex(
              Exception,
              "You have already set embeddings by running set_embeddings or set_embeddings_model.",
          ):
              embeddings_resolver.set_embeddings(tdm.get_term_doc_mat())
      c, axes = embeddings_resolver.project_embeddings(
          projection_model=TruncatedSVD(3)
      )
      self.assertIsInstance(c, ParsedCorpus)
      self.assertEqual(
          axes.to_dict(),
          pd.DataFrame(
              index=["speak"],
              data={
                  "x": [
                      0.0,
                  ],
                  "y": [
                      0.0,
                  ],
              },
          ).to_dict(),
      )
  
file_path: scattertext/scattertext/test/test_embeddingsResolver.py
imports: import pandas
  from unittest import TestCase
  import numpy
  from sklearn.decomposition import TruncatedSVD
  from scattertext import EmbeddingsResolver, ClassPercentageCompactor, CorpusFromPandas, whitespace_nlp, CorpusFromParsedDocuments, ParsedCorpus
  from scattertext.test.test_CorpusFromParsedDocuments import build_term_doc_matrix
  from scattertext.test.test_corpusFromPandas import get_docs_categories
label_desc: Use image node_id 2 for calling the TestEmbeddingsResolver obj's underlying member method code with example usage: obj.test_resolve_embeddings() without return types