code: def _apply_pipeline_and_get_build_instance(
      self,
      X_factory,
      mX_factory,
      category_idx_store,
      df,
      parse_pipeline,
      term_idx_store,
      metadata_idx_store,
      y,
  ):
      df.apply(parse_pipeline.parse, axis=1)
      y = np.array(y)
      X, mX = self._build_sparse_matrices(y, X_factory, mX_factory)
      tdm = TermDocMatrix(
          X,
          mX,
          y,
          term_idx_store,
          category_idx_store,
          metadata_idx_store,
      )
      return tdm
  
imports: import numpy
  import pandas
  from scattertext.AsianNLP import chinese_nlp
  from scattertext.CSRMatrixTools import CSRMatrixFactory
  from scattertext.TermDocMatrix import TermDocMatrix
  from scattertext.TermDocMatrixFactory import TermDocMatrixFactory
  from scattertext.TermDocMatrixWithoutCategories import TermDocMatrixWithoutCategories
  from scattertext.indexstore.IndexStore import IndexStore
label_desc: Use image node_id 3 for calling the TermDocMatrixFromPandas obj's underlying member method code with example usage: obj._apply_pipeline_and_get_build_instance(X_factory, mX_factory, category_idx_store, df, parse_pipeline, term_idx_store, metadata_idx_store, y) and returns: tdm