code: def test_transferring_of_modules_ensures_type_consistency(self):
      model_archive = str(
          self.FIXTURES_ROOT
          / "basic_classifier"
          / "serialization"
          / "model.tar.gz"
      )
      trained_model = load_archive(model_archive).model
  
      config_file = str(
          self.FIXTURES_ROOT
          / "basic_classifier"
          / "experiment_seq2seq.jsonnet"
      )
      model_params = (
          Params.from_file(config_file).pop("model").as_dict(quiet=True)
      )
  
      # Override only text_field_embedder and make it load Seq2SeqEncoder
      model_params["text_field_embedder"] = {
          "_pretrained": {
              "archive_file": model_archive,
              "module_path": "_seq2seq_encoder._module",
          }
      }
      with pytest.raises(ConfigurationError):
          Model.from_params(
              vocab=trained_model.vocab, params=Params(model_params)
          )
  
imports: from typing import Dict, Iterable, List, Mapping, Optional, Set, Tuple, Union
  import pytest
  import torch
  from allennlp.common import Lazy, Params, Registrable
  from allennlp.common.from_params import FromParams, takes_arg, remove_optional, create_kwargs
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data import DataLoader, DatasetReader, Tokenizer
  from allennlp.models import Model
  from allennlp.models.archival import load_archive
  from allennlp.common.checks import ConfigurationError
label_desc: Use image node_id 19 for calling the TestFromParams obj's underlying member method code with example usage: obj.test_transferring_of_modules_ensures_type_consistency() without return types