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 forward(self, batch):
      for i, layer in enumerate(self.children()):
          x = batch.x
          batch = layer(batch)
          if cfg.gnn.stage_type == "skipsum":
              batch.x = x + batch.x
          elif (
              cfg.gnn.stage_type == "skipconcat"
              and i < self.num_layers - 1
          ):
              batch.x = torch.cat([x, batch.x], dim=1)
      if cfg.gnn.l2norm:
          batch.x = F.normalize(batch.x, p=2, dim=-1)
      return batch
  
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 2 for calling the GNNStackStage obj's underlying member method code with example usage: obj.forward(batch) and returns: batch