code: def test_huggingface_wordpiece_tokenizer():
      with tempfile.TemporaryDirectory() as dir_path:
          vocab_path = os.path.join(dir_path, "hf_wordpiece.vocab")
          download(
              url=get_repo_url()
              + "tokenizer_test_models/hf_wordpiece/test_hf_wordpiece.vocab",
              path=vocab_path,
          )
          hf_vocab_path = os.path.join(
              dir_path, "hf_wordpiece.hf_vocab"
          )
          download(
              url=get_repo_url()
              + "tokenizer_test_models/hf_wordpiece/test_hf_wordpiece.hf_vocab",
              path=hf_vocab_path,
          )
  
          # Case 1, lowercase=True
          tokenizer = HuggingFaceWordPieceTokenizer(
              vocab_path, lowercase=True
          )
          gt_tokenized = [
              [
                  "hello",
                  ",",
                  "y",
                  "'",
                  "all",
                  "!",
                  "how",
                  "are",
                  "you",
                  "<unk>",
                  "<unk>",
                  "<unk>",
                  "<unk>",
                  "?",
              ],
              [
                  "gl",
                  "##uo",
                  "##nn",
                  "##l",
                  "##p",
                  "is",
                  "great",
                  "\uff01",
                  "\uff01",
                  "\uff01",
                  "!",
                  "!",
                  "!",
              ],
              [
                  "gl",
                  "##uo",
                  "##nn",
                  "##l",
                  "##p",
                  "-",
                  "amazon",
                  "-",
                  "hai",
                  "##bin",
                  "-",
                  "leonard",
                  "-",
                  "shen",
                  "##g",
                  "-",
                  "shu",
                  "##ai",
                  "-",
                  "xin",
                  "##g",
                  "##ji",
                  "##an",
                  ".",
                  ".",
                  ".",
                  ".",
                  ".",
                  "/",
                  ":",
                  "!",
                  "@",
                  "#",
                  "'",
                  "abc",
                  "'",
              ],
          ]
          gt_offsets = [
              [
                  (0, 5),
                  (5, 6),
                  (7, 8),
                  (8, 9),
                  (9, 12),
                  (12, 13),
                  (14, 17),
                  (18, 21),
                  (22, 25),
                  (26, 27),
                  (28, 29),
                  (30, 31),
                  (32, 33),
                  (34, 35),
              ],
              [
                  (0, 2),
                  (2, 4),
                  (4, 6),
                  (6, 7),
                  (7, 8),
                  (9, 11),
                  (12, 17),
                  (17, 18),
                  (18, 19),
                  (19, 20),
                  (20, 21),
                  (21, 22),
                  (22, 23),
              ],
              [
                  (0, 2),
                  (2, 4),
                  (4, 6),
                  (6, 7),
                  (7, 8),
                  (8, 9),
                  (9, 15),
                  (15, 16),
                  (16, 19),
                  (19, 22),
                  (22, 23),
                  (23, 30),
                  (30, 31),
                  (31, 35),
                  (35, 36),
                  (36, 37),
                  (37, 40),
                  (40, 42),
                  (42, 43),
                  (43, 46),
                  (46, 47),
                  (47, 49),
                  (49, 51),
                  (51, 52),
                  (52, 53),
                  (53, 54),
                  (54, 55),
                  (55, 56),
                  (56, 57),
                  (57, 58),
                  (58, 59),
                  (59, 60),
                  (60, 61),
                  (62, 63),
                  (63, 66),
                  (66, 67),
              ],
          ]
          gt_decode = [
              "hello, y'all! how are you?",
              "gluonnlp is great ！ ！ ！!!!",
              "gluonnlp - amazon - haibin - leonard - sheng - shuai - xingjian..... / :! @ #'abc '",
          ]
          verify_encode_token(
              tokenizer, SUBWORD_TEST_SAMPLES, gt_tokenized
          )
          verify_pickleble(tokenizer, HuggingFaceWordPieceTokenizer)
          verify_encode_token_with_offsets(
              tokenizer, SUBWORD_TEST_SAMPLES, gt_offsets
          )
          verify_decode_hf(tokenizer, SUBWORD_TEST_SAMPLES, gt_decode)
  
          # Case 2, lowercase=False
          gt_lowercase_decode = [
              ", y'all! are you?",
              "is great ！ ！ ！!!!",
              "- - - - - -..... / :! @ #'abc '",
          ]
          tokenizer = HuggingFaceWordPieceTokenizer(
              vocab_path, lowercase=False
          )
          verify_decode_hf(
              tokenizer, SUBWORD_TEST_SAMPLES, gt_lowercase_decode
          )
  
          # Case 3, using original hf vocab
          tokenizer = HuggingFaceWordPieceTokenizer(
              hf_vocab_path, lowercase=True
          )
          verify_encode_token(
              tokenizer, SUBWORD_TEST_SAMPLES, gt_tokenized
          )
          verify_pickleble(tokenizer, HuggingFaceWordPieceTokenizer)
          verify_encode_token_with_offsets(
              tokenizer, SUBWORD_TEST_SAMPLES, gt_offsets
          )
          verify_decode_hf(tokenizer, SUBWORD_TEST_SAMPLES, gt_decode)
  
          os.remove(vocab_path)
          os.remove(hf_vocab_path)
  
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 21 for calling a global function with example usage: test_huggingface_wordpiece_tokenizer() without return types