code: def test_fast_bert_custom_vocab(caplog):
      caplog.set_level(logging.CRITICAL)
  
      lang_model = "bert-base-cased"
  
      tokenizer = Tokenizer.load(
          pretrained_model_name_or_path=lang_model,
          do_lower_case=False,
          use_fast=True,
      )
  
      # deprecated: tokenizer.add_custom_vocab("samples/tokenizer/custom_vocab.txt")
      tokenizer.add_tokens(new_tokens=["neverseentokens"])
  
      basic_text = "Some Text with neverseentokens plus !215?#. and a combined-token_with/chars"
  
      # original tokenizer from transformer repo
      tokenized = tokenizer.tokenize(basic_text)
      assert tokenized == [
          "Some",
          "Text",
          "with",
          "neverseentokens",
          "plus",
          "!",
          "215",
          "?",
          "#",
          ".",
          "and",
          "a",
          "combined",
          "-",
          "token",
          "_",
          "with",
          "/",
          "ch",
          "##ars",
      ]
  
      # ours with metadata
      encoded = tokenizer.encode_plus(
          basic_text, add_special_tokens=False
      ).encodings[0]
      offsets = [x[0] for x in encoded.offsets]
      start_of_word_single = [True] + list(
          np.ediff1d(encoded.words) > 0
      )
      assert encoded.tokens == tokenized
      assert offsets == [
          0,
          5,
          10,
          15,
          31,
          36,
          37,
          40,
          41,
          42,
          44,
          48,
          50,
          58,
          59,
          64,
          65,
          69,
          70,
          72,
      ]
      assert start_of_word_single == [
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          True,
          False,
      ]
  
file_path: FARM/test/test_tokenization.py
imports: import logging
  import pytest
  import re
  from transformers import BertTokenizer, BertTokenizerFast, RobertaTokenizer, RobertaTokenizerFast, XLNetTokenizer, XLNetTokenizerFast, ElectraTokenizerFast
  from tokenizers.pre_tokenizers import WhitespaceSplit
  from farm.modeling.tokenization import Tokenizer, tokenize_with_metadata, truncate_sequences
  import numpy
label_desc: Use image node_id 8 for calling a global function with example usage: test_fast_bert_custom_vocab(caplog) without return types