code: def test_build_censor_entities(self):
      categories, documents = get_docs_categories()
      clean_function = lambda text: "" if text.startswith("[") else text
      term_doc_mat = TermDocMatrixFactory(
          category_text_iter=zip(categories, documents),
          clean_function=clean_function,
          nlp=_testing_nlp,
          feats_from_spacy_doc=FeatsFromSpacyDoc(
              entity_types_to_censor=set(["GPE"])
          ),
      ).build()
      self.assertIn("_GPE", set(term_doc_mat.get_term_freq_df().index))
      self.assertNotIn(
          "brooklyn", set(term_doc_mat.get_term_freq_df().index)
      )
  
imports: import re
  from unittest import TestCase
  import pandas
  from sklearn.feature_extraction.text import TfidfTransformer
  from sklearn.linear_model import PassiveAggressiveClassifier
  from scattertext import CorpusFromParsedDocuments
  from scattertext import FeatsFromSpacyDoc, FeatsFromSpacyDocAndEmpath
  from scattertext import TermDocMatrixFactory
  from scattertext.TermDocMatrixFactory import FeatsFromDoc
  from scattertext.WhitespaceNLP import whitespace_nlp, Doc, Tok
label_desc: Use image node_id 2 for calling the TestTermDocMatrixFactory obj's underlying member method code with example usage: obj.test_build_censor_entities() without return types