code: def test_embedding_vocab_extension_raises_error_for_incorrect_vocab(
      self,
  ):
      # When vocab namespace of extension vocab is smaller than embeddings
      # it should raise configuration error.
      vocab = Vocabulary({"tokens": {"word1": 1, "word2": 1}})
      embedding_params = Params(
          {"vocab_namespace": "tokens", "embedding_dim": 10}
      )
      embedder = Embedding.from_params(embedding_params, vocab=vocab)
      with pytest.raises(ConfigurationError):
          embedder.extend_vocab(Vocabulary(), "tokens")
  
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 16 for calling the TestEmbedding obj's underlying member method code with example usage: obj.test_embedding_vocab_extension_raises_error_for_incorrect_vocab() without return types