code: def __init__(self, config: GraphormerConfig) -> None:
      super().__init__()
  
      # Initialize parameters
      self.embedding_dim = config.embedding_dim
      self.num_attention_heads = config.num_attention_heads
      self.q_noise = config.q_noise
      self.qn_block_size = config.qn_block_size
      self.pre_layernorm = config.pre_layernorm
  
      self.dropout_module = torch.nn.Dropout(
          p=config.dropout, inplace=False
      )
  
      self.activation_dropout_module = torch.nn.Dropout(
          p=config.activation_dropout, inplace=False
      )
  
      # Initialize blocks
      self.activation_fn = ACT2FN[config.activation_fn]
      self.self_attn = GraphormerMultiheadAttention(config)
  
      # layer norm associated with the self attention layer
      self.self_attn_layer_norm = nn.LayerNorm(self.embedding_dim)
  
      self.fc1 = self.build_fc(
          self.embedding_dim,
          config.ffn_embedding_dim,
          q_noise=config.q_noise,
          qn_block_size=config.qn_block_size,
      )
      self.fc2 = self.build_fc(
          config.ffn_embedding_dim,
          self.embedding_dim,
          q_noise=config.q_noise,
          qn_block_size=config.qn_block_size,
      )
  
      # layer norm associated with the position wise feed-forward NN
      self.final_layer_norm = nn.LayerNorm(self.embedding_dim)
  
imports: import math
  from typing import Iterable, Iterator, List, Optional, Tuple, Union
  import torch
  import torch.nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
  from ...activations import ACT2FN
  from ...modeling_outputs import BaseModelOutputWithNoAttention, SequenceClassifierOutput
  from ...modeling_utils import PreTrainedModel
  from ...utils import logging
  from .configuration_graphormer import GraphormerConfig
label_desc: Use image node_id 1 to create a new GraphormerGraphEncoderLayer object from inherited base classes: nn with example: obj = GraphormerGraphEncoderLayer(config)