code: def _get_document_tokens(document):
      if isinstance(document, basestring):
          tokens = set(
              (
                  strip_punc(w, all=False)
                  for w in word_tokenize(document, include_punc=False)
              )
          )
      else:
          tokens = set(strip_punc(w, all=False) for w in document)
      return tokens
  
imports: from __future__ import absolute_import
  from itertools import chain
  import nltk
  from textblob.compat import basestring
  from textblob.decorators import cached_property
  from textblob.exceptions import FormatError
  from textblob.tokenizers import word_tokenize
  from textblob.utils import strip_punc, is_filelike
  import textblob.formats
label_desc: Use image node_id 2 for calling a global function with example usage: _get_document_tokens(document) and returns: tokens