code: def test_make_vocab_with_extension(self):
      existing_serialization_dir = self.TEST_DIR / "existing"
      extended_serialization_dir = self.TEST_DIR / "extended"
      existing_vocab_path = existing_serialization_dir / "vocabulary"
      extended_vocab_path = extended_serialization_dir / "vocabulary"
  
      vocab = Vocabulary()
      vocab.add_token_to_namespace(
          "some_weird_token_1", namespace="tokens"
      )
      vocab.add_token_to_namespace(
          "some_weird_token_2", namespace="tokens"
      )
      os.makedirs(existing_serialization_dir, exist_ok=True)
      vocab.save_to_files(existing_vocab_path)
  
      self.params["vocabulary"] = {}
      self.params["vocabulary"]["directory_path"] = existing_vocab_path
      self.params["vocabulary"]["extend"] = True
      self.params["vocabulary"]["min_count"] = {"tokens": 3}
      make_vocab_from_params(self.params, extended_serialization_dir)
  
      vocab_files = os.listdir(extended_vocab_path)
      assert set(vocab_files) == set(
          ["labels.txt", "non_padded_namespaces.txt", "tokens.txt"]
      )
  
      with open(extended_vocab_path / "tokens.txt") as f:
          tokens = [line.strip() for line in f]
  
      assert tokens[0] == "@@UNKNOWN@@"
      assert tokens[1] == "some_weird_token_1"
      assert tokens[2] == "some_weird_token_2"
  
      tokens.sort()
      assert tokens == [
          ".",
          "@@UNKNOWN@@",
          "animals",
          "are",
          "some_weird_token_1",
          "some_weird_token_2",
      ]
  
      with open(extended_vocab_path / "labels.txt") as f:
          labels = [line.strip() for line in f]
  
      labels.sort()
      assert labels == ["N", "V"]
  
imports: from __future__ import with_statement
  from __future__ import division
  from __future__ import absolute_import
  import argparse
  import os
  import pytest
  from allennlp.common import Params
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.commands.make_vocab import MakeVocab, make_vocab_from_args, make_vocab_from_params
  from allennlp.data import Vocabulary
  from allennlp.common.checks import ConfigurationError
  from io import open
label_desc: Use image node_id 6 for calling the TestMakeVocab obj's underlying member method code with example usage: obj.test_make_vocab_with_extension() without return types