code: def test_gat_conv(g, idtype, out_dim, num_heads):
      g = g.astype(idtype).to(F.ctx())
      ctx = F.ctx()
      gat = nn.GATConv(10, out_dim, num_heads)  # n_heads = 5
      gat.initialize(ctx=ctx)
      print(gat)
      feat = F.randn((g.number_of_src_nodes(), 10))
      h = gat(g, feat)
      assert h.shape == (g.number_of_dst_nodes(), num_heads, out_dim)
      _, a = gat(g, feat, True)
      assert a.shape == (g.num_edges(), num_heads, 1)
  
      # test residual connection
      gat = nn.GATConv(10, out_dim, num_heads, residual=True)
      gat.initialize(ctx=ctx)
      h = gat(g, feat)
  
imports: import backend
  import dgl
  import dgl.function
  import dgl.nn.mxnet
  import mxnet
  import networkx
  import numpy
  import pytest
  import scipy
  from mxnet import autograd, gluon, nd
  from utils import parametrize_idtype
  from utils.graph_cases import get_cases, random_bipartite, random_dglgraph, random_graph
label_desc: Use image node_id 8 for calling a global function with example usage: test_gat_conv(g, idtype, out_dim, num_heads) without return types