code: def __init__(
      self,
      state_dimension: int,
      message_dimension: int,
      num_edge_types: int,
      message_aggregation_function: str,
      dropout_rate: float = 0.0,
      edge_feature_dimension: int = 0,
  ):
      super().__init__()
  
      self.__edge_message_transformation_layers = nn.ModuleList(
          [
              nn.Linear(
                  state_dimension + edge_feature_dimension,
                  message_dimension,
                  bias=False,
              )
              for _ in range(num_edge_types)
          ]
      )
      for msg_layer in self.__edge_message_transformation_layers:
          nn.init.xavier_normal_(
              msg_layer.weight, gain=(1 / num_edge_types) ** 0.5
          )
      self.__state_update = nn.GRUCell(
          input_size=message_dimension, hidden_size=state_dimension
      )
      nn.init.orthogonal_(self.__state_update.weight_hh)
      nn.init.xavier_uniform_(self.__state_update.weight_ih)
      nn.init.normal_(self.__state_update.bias_hh, std=1e-5)
      nn.init.normal_(self.__state_update.bias_ih, std=1e-5)
      self.__state_dimension = state_dimension
      self.__aggregation_fn = message_aggregation_function
      self.__dropout = nn.Dropout(p=dropout_rate)
  
file_path: ptgnn/ptgnn/neuralmodels/gnn/messagepassing/gatedmessagepassing.py
imports: import torch
  from torch import nn
  from typing import Dict, List, Tuple
  from ptgnn.neuralmodels.gnn.messagepassing.abstractmessagepassing import AbstractMessagePassingLayer
label_desc: Use image node_id 1 to create a new GatedMessagePassingLayer object from inherited base classes: AbstractMessagePassingLayer with example: obj = GatedMessagePassingLayer(state_dimension, message_dimension, num_edge_types, message_aggregation_function, dropout_rate, edge_feature_dimension)