code: def __init__(
      self, input_dim, hidden_dim, output_dim, args, task="node"
  ):
      super(GNNStack, self).__init__()
      self.input_dim = input_dim
      conv_model = self.build_conv_model(args.conv_type)
      self.convs = nn.ModuleList()
      self.convs.append(conv_model(input_dim, hidden_dim))
      self.conv_type = args.conv_type
      assert args.n_layers >= 1, "Number of layers is not >=1"
      for l in range(args.n_layers - 1):
          self.convs.append(conv_model(hidden_dim, hidden_dim))
  
      if self.conv_type == "gated":
          self.glob_soft_attn = pyg_nn.GlobalAttention(
              nn.Sequential(
                  nn.Linear(hidden_dim, hidden_dim),
                  nn.ReLU(),
                  nn.Linear(hidden_dim, 1),
              )
          )
  
      # post-message-passing
      self.post_mp = nn.Sequential(
          nn.Linear(args.n_layers * hidden_dim, hidden_dim),
          nn.Dropout(args.dropout),
          nn.Linear(hidden_dim, output_dim),
      )
  
      self.task = task
      if not (self.task == "node" or self.task == "graph"):
          raise RuntimeError("Unknown task.")
  
      self.dropout = args.dropout
      self.num_layers = args.n_layers
      self.hidden_dim = hidden_dim
  
imports: from functools import reduce
  import random
  import networkx
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch_geometric.nn
  import torch_geometric.utils
  import utils
label_desc: Use image node_id 1 to create a new GNNStack object from inherited base classes: nn with example: obj = GNNStack(input_dim, hidden_dim, output_dim, args, task)