class_docstr: Word piece tokenizer for BERT models.
class_docstr_tok: ["Word","piece","tokenizer","for","BERT","models","."]
code: def from_config(cls, config: Config):
      basic_tokenizer = create_component(
          ComponentType.TOKENIZER, config.basic_tokenizer
      )
      vocab = WordPieceTokenizer.load_vocab(config.wordpiece_vocab_path)
      wordpiece_tokenizer = WordpieceTokenizer(
          vocab=vocab, unk_token="[UNK]"
      )  # UNK is for compatibility with HF v0.5
      return cls(vocab, basic_tokenizer, wordpiece_tokenizer)
  
imports: import copy
  import json
  import re
  from collections import OrderedDict
  from typing import List, NamedTuple, Optional, Union
  import torch
  from fairseq.data.encoders.gpt2_bpe import get_encoder
  from fairseq.data.encoders.gpt2_bpe_utils import Encoder
  from pytext.config import ConfigBase
  from pytext.config.component import Component, ComponentType, create_component
  from pytext.data.pickleable_gpt2bpe_encoder import PickleableGPT2BPEEncoder
  from pytext.torchscript.tokenizer import ScriptDoNothingTokenizer, ScriptWordTokenizer
  from pytext.utils.file_io import PathManager
  from pytext.utils.usage import log_class_usage
  from transformers.tokenization_bert import BasicTokenizer, WordpieceTokenizer
label_desc: Use image node_id 2 for calling the WordPieceTokenizer obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls