code: def build_sparse_matrices_with_num_docs(
      num_docs, X_factory, mX_factory
  ):
      return (
          X_factory.set_last_row_idx(num_docs - 1).get_csr_matrix(),
          mX_factory.set_last_row_idx(num_docs - 1).get_csr_matrix(),
      )
  
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 2 for calling a global function with example usage: build_sparse_matrices_with_num_docs(num_docs, X_factory, mX_factory) and returns: X_factory,  mX_factory