code: def test_embedding_vocab_extension_with_specified_namespace(self):
      vocab = Vocabulary()
      vocab.add_token_to_namespace("word1", "tokens_a")
      vocab.add_token_to_namespace("word2", "tokens_a")
      embedding_params = Params(
          {"vocab_namespace": "tokens_a", "embedding_dim": 10}
      )
      embedder = Embedding.from_params(embedding_params, vocab=vocab)
      original_weight = embedder.weight
  
      assert original_weight.shape[0] == 4
  
      extension_counter = {"tokens_a": {"word3": 1}}
      vocab._extend(extension_counter)
  
      embedder.extend_vocab(vocab, "tokens_a")  # specified namespace
  
      extended_weight = embedder.weight
      assert extended_weight.shape[0] == 5
      assert torch.all(extended_weight[:4, :] == original_weight[:4, :])
  
imports: import gzip
  import warnings
  import numpy
  import pytest
  import torch
  from allennlp.common import Params
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data import Vocabulary
  from allennlp.modules.token_embedders.embedding import _read_pretrained_embeddings_file, Embedding, EmbeddingsTextFile, format_embeddings_file_uri, parse_embeddings_file_uri
label_desc: Use image node_id 11 for calling the TestEmbedding obj's underlying member method code with example usage: obj.test_embedding_vocab_extension_with_specified_namespace() without return types