class_docstr: Stacks a number of GNN layers.
  
  Args:
      dim_in (int): The input dimension
      dim_out (int): The output dimension.
      num_layers (int): The number of layers.
class_docstr_tok: ["Stacks","a","number","of","GNN","layers",".","Args",":","dim_in","(","int",")",":","The","input","dimension","dim_out","(","int",")",":","The","output","dimension",".","num_layers","(","int",")",":","The","number","of","layers","."]
code: def __init__(self, dim_in, dim_out, num_layers):
      super().__init__()
      self.num_layers = num_layers
      for i in range(num_layers):
          if cfg.gnn.stage_type == "skipconcat":
              d_in = dim_in if i == 0 else dim_in + i * dim_out
          else:
              d_in = dim_in if i == 0 else dim_out
          layer = GNNLayer(d_in, dim_out)
          self.add_module(f"layer{i}", layer)
  
imports: import torch
  import torch.nn.functional
  import torch_geometric.graphgym.register
  from torch_geometric.graphgym.config import cfg
  from torch_geometric.graphgym.init import init_weights
  from torch_geometric.graphgym.models.layer import BatchNorm1dNode, GeneralLayer, GeneralMultiLayer, new_layer_config
  from torch_geometric.graphgym.register import register_stage
label_desc: Use image node_id 1 to create a new GNNStackStage object from inherited base classes: torch.nn with example: obj = GNNStackStage(dim_in, dim_out, num_layers)