code: def tokenize_text(text, stemmer, as_set=True):
      text = normalize_answer(text)
      tokens = [stemmer.stem(word) for word in text.split(" ")]
      if as_set:
          tokens = set(tokens)
      return tokens
  
file_path: ParlAI/parlai/crowdsourcing/projects/wizard_of_internet/acceptability.py
imports: import numpy
  from typing import Iterable, List
  from nltk.stem import PorterStemmer
  from parlai.crowdsourcing.utils.acceptability import AcceptabilityChecker, normalize_answer
  import parlai.utils.logging
label_desc: Use image node_id 1 for calling a global function with example usage: tokenize_text(text, stemmer, as_set) and returns: tokens