code: def _testing_nlp(doc):
      toks = []
      for tok in re.split(r"(\W)", doc):
          pos = "WORD"
          ent = ""
          tag = ""
          if tok.strip() == "":
              pos = "SPACE"
          elif re.match("^\W+$", tok):
              pos = "PUNCT"
          if tok == "Tone":
              ent = "PERSON"
          if tok == "Brooklyn":
              ent = "GPE"
          toks.append(Tok(pos, tok[:2].lower(), tok.lower(), ent, tag))
      return Doc([toks])
  
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 8 for calling a global function with example usage: _testing_nlp(doc) and returns: Doc