code: def test_compact(self):
      tdm = build_hamlet_jz_term_doc_mat()
      c = PhraseSelector(minimum_pmi=10).compact(tdm)
      bigrams = [t for t in tdm.get_terms() if " " in t]
      new_bigrams = [t for t in c.get_terms() if " " in t]
      self.assertLess(len(new_bigrams), len(bigrams))
      self.assertTrue(set(new_bigrams) - set(bigrams) == set())
  
imports: from unittest import TestCase
  from scattertext.termcompaction.PhraseSelector import PhraseSelector
  from scattertext.test.test_termDocMatrixFactory import build_hamlet_jz_term_doc_mat
label_desc: Use image node_id 1 for calling the TestPhraseSelector obj's underlying member method code with example usage: obj.test_compact() without return types