code: def test_can_construct_from_params(biattention, params_dict):
      assert (
          biattention.num_attention_heads
          == params_dict["num_attention_heads"]
      )
      assert biattention.attention_head_size == int(
          params_dict["combined_hidden_size"]
          / params_dict["num_attention_heads"]
      )
      assert (
          biattention.all_head_size
          == params_dict["num_attention_heads"]
          * biattention.attention_head_size
      )
      assert (
          biattention.query1.in_features == params_dict["hidden_size1"]
      )
      assert biattention.key1.in_features == params_dict["hidden_size1"]
      assert (
          biattention.value1.in_features == params_dict["hidden_size1"]
      )
      assert biattention.dropout1.p == params_dict["dropout1"]
  
      assert (
          biattention.query2.in_features == params_dict["hidden_size2"]
      )
      assert biattention.key2.in_features == params_dict["hidden_size2"]
      assert (
          biattention.value2.in_features == params_dict["hidden_size2"]
      )
      assert biattention.dropout2.p == params_dict["dropout2"]
  
file_path: allennlp/tests/modules/transformer/bimodal_attention_test.py
imports: import torch
  import pytest
  from allennlp.common import Params
  from allennlp.modules.transformer import BiModalAttention
label_desc: Use image node_id 4 for calling a global function with example usage: test_can_construct_from_params(biattention, params_dict) without return types