code: def test_vocab_change(self, test_data_dir, asr_model):
      with tempfile.TemporaryDirectory() as tmpdir:
          old_tokenizer_dir = os.path.join(
              test_data_dir,
              "asr",
              "tokenizers",
              "an4_wpe_128",
              "vocab.txt",
          )
          new_tokenizer_dir = os.path.join(tmpdir, "tokenizer")
  
          os.makedirs(new_tokenizer_dir, exist_ok=True)
          shutil.copy2(old_tokenizer_dir, new_tokenizer_dir)
  
          nw1 = asr_model.num_weights
          asr_model.change_vocabulary(
              new_tokenizer_dir=new_tokenizer_dir,
              new_tokenizer_type="wpe",
          )
          # No change
          assert nw1 == asr_model.num_weights
  
          with open(
              os.path.join(new_tokenizer_dir, "vocab.txt"), "a+"
          ) as f:
              f.write("!\n")
              f.write("$\n")
              f.write("@\n")
  
          asr_model.change_vocabulary(
              new_tokenizer_dir=new_tokenizer_dir,
              new_tokenizer_type="wpe",
          )
  
          # rnn embedding + joint + bias
          pred_embedding = 3 * (asr_model.decoder.pred_hidden)
          joint_joint = 3 * (asr_model.joint.joint_hidden + 1)
          assert asr_model.num_weights == (
              nw1 + (pred_embedding + joint_joint)
          )
  
imports: import os
  import shutil
  import tempfile
  import pytest
  import torch
  from omegaconf import DictConfig
  from nemo.collections.asr.models import ASRModel
  from nemo.collections.asr.models.rnnt_bpe_models import EncDecRNNTBPEModel
  from nemo.collections.asr.parts.submodules import rnnt_beam_decoding
  from nemo.collections.asr.parts.submodules import rnnt_greedy_decoding
  from nemo.collections.common import tokenizers
  from nemo.core.utils import numba_utils
  from nemo.core.utils.numba_utils import __NUMBA_MINIMUM_VERSION__
label_desc: Use image node_id 6 for calling the TestEncDecRNNTBPEModel obj's underlying member method code with example usage: obj.test_vocab_change(test_data_dir, asr_model) without return types