code: def compact(self, term_doc_matrix, non_text=False):
      """
      Parameters
      ----------
      term_doc_matrix : TermDocMatrix
              Term document matrix object to compact
      non_text : bool
              Use non-text features instead of terms
  
      Returns
      -------
      New term doc matrix
      """
      return term_doc_matrix.remove_terms_by_indices(
          self._indices_to_compact(term_doc_matrix, non_text), non_text
      )
  
imports: from sklearn.pipeline import Pipeline
label_desc: Use image node_id 2 for calling the ScikitSupervisedCompactor obj's underlying member method code with example usage: obj.compact(term_doc_matrix, non_text) and returns: term_doc_matrix