code: def test_attention_basics(self):
      # No scale
      self.run_layer_test(
          layers.AdditiveAttention,
          init_kwargs={
              "use_scale": True,
              "dropout": 0.5,
          },
          input_shape=[(2, 3, 4), (2, 4, 4)],
          expected_output_shape=(2, 3, 4),
          expected_num_trainable_weights=1,
          expected_num_non_trainable_weights=0,
          expected_num_seed_generators=1,
          expected_num_losses=0,
          supports_masking=True,
          run_training_check=False,
      )
      # With scale.
      self.run_layer_test(
          layers.AdditiveAttention,
          init_kwargs={
              "use_scale": False,
              "dropout": 0.5,
          },
          input_shape=[(2, 3, 4), (2, 4, 4)],
          expected_output_shape=(2, 3, 4),
          expected_num_trainable_weights=0,
          expected_num_non_trainable_weights=0,
          expected_num_seed_generators=1,
          expected_num_losses=0,
          supports_masking=True,
          run_training_check=False,
      )
  
file_path: keras/keras/layers/attention/additive_attention_test.py
imports: import numpy
  from keras import layers
  from keras import testing
label_desc: Use image node_id 1 for calling the AdditiveAttentionTest obj's underlying member method code with example usage: obj.test_attention_basics() without return types