code: def compact(self, term_doc_matrix, non_text=False):
      elim_df = self.get_elimination_df(term_doc_matrix, non_text)
      if self.verbose:
          print(
              f"Ngram percentage compactor removed {len(elim_df)} terms."
          )
  
      return term_doc_matrix.remove_terms(
          terms=elim_df.Eliminations,
          ignore_absences=True,
          non_text=non_text,
      )
  
file_path: scattertext/scattertext/termcompaction/ngram_percentage_compactor.py
imports: import abc
  import pandas
  from tqdm.auto import tqdm
  from scattertext.TermDocMatrixWithoutCategories import TermDocMatrixWithoutCategories
  from scattertext.features.featoffsets.flexible_ngram_features import sequence_window
  from scattertext.termranking import AbsoluteFrequencyRanker
label_desc: Use image node_id 2 for calling the NgramPercentageCompactor obj's underlying member method code with example usage: obj.compact(term_doc_matrix, non_text) and returns: term_doc_matrix