code: def test_whitespace_tokenizer():
      tokenizer = WhitespaceTokenizer()
      gt_en_tokenized = [
          [
              "Four",
              "score",
              "and",
              "seven",
              "years",
              "ago",
              "our",
              "fathers",
              "brought",
              "forth",
              "on",
              "this",
              "continent,",
              "a",
              "new",
              "nation,",
              "conceived",
              "in",
              "Liberty,",
              "and",
              "dedicated",
              "to",
              "the",
              "proposition",
              "that",
              "all",
              "men",
              "are",
              "created",
              "equal.",
          ],
          [
              "In",
              "spite",
              "of",
              "the",
              "debate",
              "going",
              "on",
              "for",
              "months",
              "about",
              "the",
              "photos",
              "of",
              "Özil",
              "with",
              "the",
              "Turkish",
              "President",
              "Recep",
              "Tayyip",
              "Erdogan,",
              "he",
              "regrets",
              "the",
              "return",
              "of",
              "the",
              "92-match",
              "national",
              "player",
              "Özil.",
          ],
      ]
      gt_de_tokenized = [
          [
              "Goethe",
              "stammte",
              "aus",
              "einer",
              "angesehenen",
              "bürgerlichen",
              "Familie;",
              "sein",
              "Großvater",
              "mütterlicherseits",
              "war",
              "als",
              "Stadtschultheiß",
              "höchster",
              "Justizbeamter",
              "der",
              "Stadt",
              "Frankfurt,",
              "sein",
              "Vater",
              "Doktor",
              "der",
              "Rechte",
              "und",
              "kaiserlicher",
              "Rat.",
          ],
          [
              '"Das',
              "ist",
              "eine",
              "Frage,",
              "die",
              "natürlich",
              "davon",
              "abhängt,",
              "dass",
              "man",
              "einmal",
              "ins",
              "Gespräch",
              "kommt,",
              "dass",
              "man",
              "mit",
              "ihm",
              "auch",
              "darüber",
              "spricht,",
              "warum",
              "er",
              "das",
              "eine",
              "oder",
              "andere",
              "offenbar",
              "so",
              "empfunden",
              "hat,",
              "wie",
              "das",
              "in",
              "seinem",
              "Statement",
              "niedergelegt",
              'ist",',
              "sagte",
              "Grindel",
              "im",
              "Fußball-Podcast",
              '"Phrasenmäher"',
              "der",
              '"Bild-Zeitung.',
          ],
      ]
      for _ in range(2):
          # Inject noise and test for encode
          noisy_en_samples = [
              random_inject_space(ele) for ele in EN_SAMPLES
          ]
          noisy_de_samples = [
              random_inject_space(ele) for ele in DE_SAMPLES
          ]
          verify_encode_token(
              tokenizer,
              noisy_en_samples + noisy_de_samples,
              gt_en_tokenized + gt_de_tokenized,
          )
          # Test for decode
          verify_decode(tokenizer, EN_SAMPLES + DE_SAMPLES, str)
          # Test for encode_with_offsets
          verify_encode_token_with_offsets(
              tokenizer, noisy_en_samples + noisy_de_samples
          )
      verify_decode_no_vocab_raise(tokenizer)
  
      # Test for output_type = int
      vocab = Vocab(
          collections.Counter(
              sum(gt_en_tokenized + gt_de_tokenized, [])
          )
      )
      tokenizer.set_vocab(vocab)
      verify_decode(tokenizer, EN_SAMPLES + DE_SAMPLES, int)
      verify_pickleble(tokenizer, WhitespaceTokenizer)
      verify_encode_token_with_offsets(
          tokenizer, EN_SAMPLES + DE_SAMPLES
      )
  
imports: import pytest
  import random
  import collections
  import pickle
  from uuid import uuid4
  import os
  import unicodedata
  import tempfile
  from pkg_resources import parse_version
  import gluonnlp
  from gluonnlp.data.tokenizers import WhitespaceTokenizer, MosesTokenizer, JiebaTokenizer, SpacyTokenizer, SubwordNMTTokenizer, YTTMTokenizer, SentencepieceTokenizer, HuggingFaceBPETokenizer, HuggingFaceByteBPETokenizer, HuggingFaceWordPieceTokenizer, HuggingFaceTokenizer
  from gluonnlp.base import get_repo_url
  from gluonnlp.data import Vocab, load_vocab
  from gluonnlp.utils.misc import download
  from gluonnlp.models.t5 import T5Tokenizer
label_desc: Use image node_id 12 for calling a global function with example usage: test_whitespace_tokenizer() without return types