code: def _make_new_term_doc_matrix(
      self,
      new_X=None,
      new_mX=None,
      new_y=None,
      new_term_idx_store=None,
      new_category_idx_store=None,
      new_metadata_idx_store=None,
      new_y_mask=None,
      new_df=None,
      new_term_offsets=None,
      new_metadata_offsets=None,
  ):
      X, mX, y = self._update_X_mX_y(new_X, new_mX, new_y, new_y_mask)
      metadata_offsets, term_offsets = self._update_offsets(
          new_metadata_idx_store=new_metadata_idx_store,
          new_metadata_offsets=new_metadata_offsets,
          new_term_idx_store=new_term_idx_store,
          new_term_offsets=new_term_offsets,
      )
  
      return OffsetCorpus(
          X=X,
          mX=mX,
          y=y,
          parsed_col=self._parsed_col,
          category_col=self._category_col,
          term_idx_store=new_term_idx_store
          if new_term_idx_store is not None
          else self._term_idx_store,
          category_idx_store=new_category_idx_store
          if new_category_idx_store is not None
          else self._category_idx_store,
          metadata_idx_store=new_metadata_idx_store
          if new_metadata_idx_store is not None
          else self._metadata_idx_store,
          df=self._apply_mask_to_df(new_y_mask, new_df),
          term_offsets=term_offsets,
          metadata_offsets=metadata_offsets,
          unigram_frequency_path=self._unigram_frequency_path,
      )
  
file_path: scattertext/scattertext/OffsetCorpus.py
imports: from copy import copy
  from scattertext.ParsedCorpus import ParsedCorpus
label_desc: Use image node_id 3 for calling the OffsetCorpus obj's underlying member method code with example usage: obj._make_new_term_doc_matrix(new_X, new_mX, new_y, new_term_idx_store, new_category_idx_store, new_metadata_idx_store, new_y_mask, new_df, new_term_offsets, new_metadata_offsets) and returns: OffsetCorpus