code: def __init__(
      self,
      vocab,
      unk_token="[UNK]",
      sep_token="[SEP]",
      cls_token="[CLS]",
      pad_token="[PAD]",
      mask_token="[MASK]",
      wordpiece_prefix="##",
      sentencepiece_prefix="",
      lower=True,
      encoding="utf8",
      special_token_list=[],
  ):
      if not isinstance(vocab, dict):
          raise ValueError(
              "expect `vocab` to be instance of dict, got %s"
              % type(vocab)
          )
      self.vocab = vocab
      self.lower = lower
      self.prefix = wordpiece_prefix
      self.sentencepiece_prefix = sentencepiece_prefix
      self.pad_id = self.vocab[pad_token]
      self.cls_id = cls_token and self.vocab[cls_token]
      self.sep_id = sep_token and self.vocab[sep_token]
      self.unk_id = unk_token and self.vocab[unk_token]
      self.mask_id = mask_token and self.vocab[mask_token]
      self.unk_token = unk_token
      special_tokens = {
          pad_token,
          cls_token,
          sep_token,
          unk_token,
          mask_token,
      } | set(special_token_list)
      pat_str = ""
      for t in special_tokens:
          if t is None:
              continue
          pat_str += "(%s)|" % re.escape(t)
      pat_str += r"([a-zA-Z0-9]+|\S)"
      log.debug("regex: %s" % pat_str)
      self.pat = re.compile(pat_str)
      self.encoding = encoding
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import logging
  import os
  import re
  import sys
  import tempfile
  from functools import partial
  from pathlib import Path
  import six
  from tqdm import tqdm
  import numpy
  from disco_diffusion_ernievil_base.vit_b_16x.ernievil2.transformers.file_utils import _fetch_from_remote
  import io
label_desc: Use image node_id 2 to create a new ErnieTokenizer object from inherited base classes: object with example: obj = ErnieTokenizer(vocab, unk_token, sep_token, cls_token, pad_token, mask_token, wordpiece_prefix, sentencepiece_prefix, lower, encoding, special_token_list)