code: def test_fit_predict_eval():
      num_heads = 8
      head_size = 12
  
      inputs = tf.keras.layers.Input(shape=[42, 13])
  
      net = MultiHeadAttention(
          head_size=head_size, num_heads=num_heads, dropout=0.5
      )([inputs, inputs, inputs])
      net = tf.keras.layers.GlobalAveragePooling1D()(net)
      net = tf.keras.layers.Dense(10, activation="softmax")(net)
  
      model = tf.keras.Model(inputs=inputs, outputs=net)
  
      model.compile(
          loss=tf.losses.SparseCategoricalCrossentropy(),
          optimizer=tf.keras.optimizers.Adam(0.001),
      )
  
      model.fit(
          x=np.random.uniform(size=(50, 42, 13)),
          y=np.random.randint(10, size=(50,)),
          batch_size=10,
          epochs=2,
      )
  
      model.predict(np.random.uniform(size=(10, 42, 13)))
  
      model.evaluate(
          x=np.random.uniform(size=(20, 42, 13)),
          y=np.random.randint(0, 10, size=(20,)),
          batch_size=10,
      )
  
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 13 for calling a global function with example usage: test_fit_predict_eval() without return types