code: def _get_words_from_dataset(dataset):
      """Return a set of all words in a dataset.
  
      :param dataset: A list of tuples of the form ``(words, label)`` where
          ``words`` is either a string of a list of tokens.
      """
  
      # Words may be either a string or a list of tokens. Return an iterator
      # of tokens accordingly
      def tokenize(words):
          if isinstance(words, basestring):
              return word_tokenize(words, include_punc=False)
          else:
              return words
  
      all_words = chain.from_iterable(
          tokenize(words) for words, _ in dataset
      )
      return set(all_words)
  
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 1 for calling a global function with example usage: _get_words_from_dataset(dataset) and returns: set, word_tokenize, words