code: def test_gat_conv(g, idtype, out_dim, num_heads):
      g = g.astype(idtype).to(F.ctx())
      ctx = F.ctx()
      gat = nn.GATConv(5, out_dim, num_heads)
      feat = F.randn((g.number_of_src_nodes(), 5))
      h = gat(g, feat)
      assert h.shape == (g.number_of_dst_nodes(), num_heads, out_dim)
      _, a = gat(g, feat, get_attention=True)
      assert a.shape == (g.num_edges(), num_heads, 1)
  
      # test residual connection
      gat = nn.GATConv(5, out_dim, num_heads, residual=True)
      h = gat(g, feat)
  
imports: from copy import deepcopy
  import backend
  import dgl
  import dgl.function
  import dgl.nn.tensorflow
  import networkx
  import numpy
  import pytest
  import scipy
  import tensorflow
  from tensorflow.keras import layers
  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