code: def test_nested_vocab(self):
      eng_vocab = {"a": 7, "b": 8}
      spa_vocab = {"a": 23, "c": 88}
      ita_vocab = {"a": 6, "d": 9}
  
      nested_vocab = {
          "eng": eng_vocab,
          "spa": spa_vocab,
          "ita": ita_vocab,
      }
  
      def check_tokenizer(tokenizer, check_ita_first=False):
          if check_ita_first:
              self.assertEqual(tokenizer.decode([6, 9, 9]), "ad")
              self.assertEqual(tokenizer.encoder, ita_vocab)
              tokenizer.set_target_lang("eng")
  
          self.assertEqual(tokenizer.encoder, eng_vocab)
          self.assertEqual(tokenizer.decode([7, 8, 7]), "aba")
  
          tokenizer.set_target_lang("spa")
          self.assertEqual(tokenizer.decode([23, 88, 23]), "aca")
          self.assertEqual(tokenizer.encoder, spa_vocab)
  
          tokenizer.set_target_lang("eng")
          self.assertEqual(tokenizer.encoder, eng_vocab)
          self.assertEqual(tokenizer.decode([7, 7, 8]), "ab")
  
          tokenizer.set_target_lang("ita")
          self.assertEqual(tokenizer.decode([6, 9, 9]), "ad")
          self.assertEqual(tokenizer.encoder, ita_vocab)
  
      with tempfile.TemporaryDirectory() as tempdir:
          tempfile_path = os.path.join(tempdir, "vocab.json")
          with open(tempfile_path, "w") as temp_file:
              json.dump(nested_vocab, temp_file)
  
          tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(
              tempdir, target_lang="eng"
          )
  
      check_tokenizer(tokenizer)
  
      with tempfile.TemporaryDirectory() as tempdir:
          # should have saved target lang as "ita" since it was last one
          tokenizer.save_pretrained(tempdir)
          tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(tempdir)
  
          self.assertEqual(tokenizer.target_lang, "ita")
          check_tokenizer(tokenizer, check_ita_first=True)
  
imports: import inspect
  import json
  import os
  import random
  import shutil
  import tempfile
  import unittest
  import numpy
  from transformers import WAV_2_VEC_2_PRETRAINED_MODEL_ARCHIVE_LIST, AddedToken, Wav2Vec2Config, Wav2Vec2CTCTokenizer, Wav2Vec2Tokenizer
  from transformers.models.wav2vec2.tokenization_wav2vec2 import VOCAB_FILES_NAMES, Wav2Vec2CTCTokenizerOutput
  from transformers.testing_utils import require_torch, slow
  from ...test_tokenization_common import TokenizerTesterMixin
label_desc: Use image node_id 19 for calling the Wav2Vec2CTCTokenizerTest obj's underlying member method code with example usage: obj.test_nested_vocab() without return types