code: def test_bert_hf_tokenizer_parity(
      tmpdir, pretrained_model_name_or_path
  ):
      """Tests the BERTTokenizer implementation.
  
      Asserts both tokens and token IDs are the same by initializing the BERTTokenizer as a standalone tokenizer and as a
      HF tokenizer.
      """
      from ludwig.utils.tokenizers import get_hf_tokenizer, HFTokenizer
  
      inputs = "Hello, ``I'm'' ónë of 1,205,000 sentences!"
      hf_tokenizer = HFTokenizer(pretrained_model_name_or_path)
      torchtext_tokenizer = get_hf_tokenizer(
          pretrained_model_name_or_path
      )
  
      # Ensure that the tokenizer is scriptable
      tokenizer_path = os.path.join(tmpdir, "tokenizer.pt")
      torch.jit.script(torchtext_tokenizer).save(tokenizer_path)
      torchtext_tokenizer = torch.jit.load(tokenizer_path)
  
      token_ids_expected = hf_tokenizer(inputs)
      token_ids = torchtext_tokenizer(inputs)
  
      assert token_ids_expected == token_ids
  
file_path: ludwig/tests/ludwig/utils/test_tokenizers.py
imports: import os
  import pytest
  import torch
  import torchtext
  from ludwig.utils.tokenizers import EnglishLemmatizeFilterTokenizer, NgramTokenizer, StringSplitTokenizer
label_desc: Use image node_id 1 for calling a global function with example usage: test_bert_hf_tokenizer_parity(tmpdir, pretrained_model_name_or_path) without return types