code: def _indices_to_compact(self, term_doc_matrix, non_text=False):
      ranker = self.term_ranker(term_doc_matrix)
      if non_text:
          ranker = ranker.use_non_text_features()
      indicies = self._get_term_indices_to_compact_from_term_freqs(
          ranker.get_ranks(), term_doc_matrix, non_text
      )
      return list(indicies)
  
file_path: scattertext/scattertext/termcompaction/CompactTerms.py
imports: import numpy
  from scattertext.CSRMatrixTools import CSRMatrixFactory
  from scattertext.indexstore import IndexStore
  from scattertext.termranking import AbsoluteFrequencyRanker
label_desc: Use image node_id 3 for calling the CompactTerms obj's underlying member method code with example usage: obj._indices_to_compact(term_doc_matrix, non_text) and returns: list