code: def test_multi_head_self_attention_runs_forward(self):
      attention = MultiHeadSelfAttention(
          num_heads=3, input_dim=5, attention_dim=6, values_dim=9
      )
      inputs = torch.randn(2, 12, 5)
      assert list(attention(inputs).size()) == [2, 12, 5]
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/modules/seq2seq_encoders/multi_head_self_attention_test.py
imports: from __future__ import absolute_import
  import numpy
  import torch
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.modules.seq2seq_encoders import MultiHeadSelfAttention
  from allennlp.common.params import Params
label_desc: Use image node_id 2 for calling the MultiHeadSelfAttentionTest obj's underlying member method code with example usage: obj.test_multi_head_self_attention_runs_forward() without return types