code: def test_multi_head_attention(
      *,
      dtype_mha,
      test_flags,
      backend_fw,
      fn_name,
      on_device,
  ):
      (
          dtype,
          q,
          k,
          v,
          num_heads,
          attention_mask,
          in_proj_weights,
          q_proj_weights,
          k_proj_weights,
          v_proj_weights,
          out_proj_weights,
          in_proj_bias,
          out_proj_bias,
          key_padding_mask,
          bias_k,
          bias_v,
          static_k,
          static_v,
          scale,
          add_zero_attn,
          dropout,
          training,
          is_causal,
          return_attention_weights,
          average_attention_weights,
          batch_first,
      ) = dtype_mha
      helpers.test_function(
          input_dtypes=dtype,
          test_flags=test_flags,
          backend_to_test=backend_fw,
          fn_name=fn_name,
          on_device=on_device,
          test_values=(dropout == 0),
          atol_=1e-02,
          rtol_=1e-02,
          query=q,
          key=k,
          value=v,
          batch_first=batch_first,
          num_heads=num_heads,
          scale=scale,
          attention_mask=attention_mask,
          in_proj_weights=in_proj_weights,
          q_proj_weights=q_proj_weights,
          k_proj_weights=k_proj_weights,
          v_proj_weights=v_proj_weights,
          out_proj_weights=out_proj_weights,
          in_proj_bias=in_proj_bias,
          out_proj_bias=out_proj_bias,
          is_causal=is_causal,
          key_padding_mask=key_padding_mask,
          bias_k=bias_k,
          bias_v=bias_v,
          static_k=static_k,
          static_v=static_v,
          add_zero_attn=add_zero_attn,
          return_attention_weights=return_attention_weights,
          average_attention_weights=average_attention_weights,
          dropout=dropout,
          training=training,
      )
  
imports: from hypothesis import strategies, assume
  import ivy
  import numpy
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_test
  from ivy.functional.ivy.layers import _deconv_length, _pack_padded_sequence
label_desc: Use image node_id 27 for calling a global function with example usage: test_multi_head_attention() without return types