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,
  ):
      X, mX, y = self._update_X_mX_y(new_X, new_mX, new_y, new_y_mask)
      return ParsedCorpus(
          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),
          unigram_frequency_path=self._unigram_frequency_path,
      )
  
imports: import sys
  from typing import Dict, Hashable
  import pandas
  from scattertext.DataFrameCorpus import DataFrameCorpus
  from scattertext.indexstore.IndexStore import IndexStore
label_desc: Use image node_id 2 for calling the ParsedCorpus 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) and returns: ParsedCorpus