code: def test_no_batch():
      num_heads = 8
      head_size = 12
  
      q = tf.random.uniform((5, 9), dtype=np.float32)
      k = tf.random.uniform((7, 11), dtype=np.float32)
      v = tf.random.uniform((7, 13), dtype=np.float32)
  
      mha = MultiHeadAttention(head_size=head_size, num_heads=num_heads)
  
      output = mha([q, k, v])
  
      assert output.shape[0] == q.shape[0]
      assert output.shape[1] == v.shape[1]
  
file_path: addons/tensorflow_addons/layers/tests/multihead_attention_test.py
imports: import tempfile
  from pathlib import Path
  import numpy
  import pytest
  import tensorflow
  from tensorflow_addons.layers.multihead_attention import MultiHeadAttention
label_desc: Use image node_id 3 for calling a global function with example usage: test_no_batch() without return types