code: def test_old_from_params_new_from_params(self):
      old_params = Params(
          {
              "words1": {"type": "embedding", "embedding_dim": 2},
              "words2": {"type": "embedding", "embedding_dim": 5},
              "words3": {"type": "embedding", "embedding_dim": 3},
          }
      )
  
      with pytest.warns(DeprecationWarning):
          BasicTextFieldEmbedder.from_params(
              params=old_params, vocab=self.vocab
          )
  
      new_params = Params(
          {
              "token_embedders": {
                  "words1": {"type": "embedding", "embedding_dim": 2},
                  "words2": {"type": "embedding", "embedding_dim": 5},
                  "words3": {"type": "embedding", "embedding_dim": 3},
              }
          }
      )
  
      token_embedder = BasicTextFieldEmbedder.from_params(
          params=new_params, vocab=self.vocab
      )
      assert token_embedder(self.inputs).size() == (1, 4, 10)
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/modules/text_field_embedders/basic_text_field_embedder_test.py
imports: from __future__ import division
  from __future__ import with_statement
  from __future__ import absolute_import
  import pytest
  import torch
  from allennlp.common import Params
  from allennlp.common.checks import ConfigurationError
  from allennlp.data import Vocabulary
  from allennlp.modules.text_field_embedders import BasicTextFieldEmbedder
  from allennlp.common.testing import AllenNlpTestCase
label_desc: Use image node_id 7 for calling the TestBasicTextFieldEmbedder obj's underlying member method code with example usage: obj.test_old_from_params_new_from_params() without return types