code: def test_mismatching_dimensions_throws_configuration_error(self):
      params = Params.from_file(self.param_file)
      # Make the phrase layer wrong - it should be 10 to match
      # the embedding + char cnn dimensions.
      params["model"]["phrase_layer"]["input_size"] = 12
      with pytest.raises(ConfigurationError):
          Model.from_params(
              vocab=self.vocab, params=params.pop("model")
          )
  
      params = Params.from_file(self.param_file)
      # Make the modeling layer input_dimension wrong - it should be 40 to match
      # 4 * output_dim of the phrase_layer.
      params["model"]["phrase_layer"]["input_size"] = 30
      with pytest.raises(ConfigurationError):
          Model.from_params(
              vocab=self.vocab, params=params.pop("model")
          )
  
      params = Params.from_file(self.param_file)
      # Make the modeling layer input_dimension wrong - it should be 70 to match
      # 4 * phrase_layer.output_dim + 3 * modeling_layer.output_dim.
      params["model"]["span_end_encoder"]["input_size"] = 50
      with pytest.raises(ConfigurationError):
          Model.from_params(
              vocab=self.vocab, params=params.pop("model")
          )
  
imports: from __future__ import with_statement
  from __future__ import division
  from __future__ import absolute_import
  from flaky import flaky
  import pytest
  import numpy
  from numpy.testing import assert_almost_equal
  import torch
  from allennlp.common import Params
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.testing import ModelTestCase
  from allennlp.data import DatasetReader, Vocabulary
  from allennlp.data.dataset import Batch
  from allennlp.models import BidirectionalAttentionFlow, Model
label_desc: Use image node_id 6 for calling the BidirectionalAttentionFlowTest obj's underlying member method code with example usage: obj.test_mismatching_dimensions_throws_configuration_error() without return types