class_docstr: Output:
      node representations
class_docstr_tok: ["Output",":","node","representations"]
docstr: emb_dim (int): node embedding dimensionality
docstr_tok: ["emb_dim","(","int",")",":","node","embedding","dimensionality"]
code: def __init__(
      self,
      num_layer,
      emb_dim,
      drop_ratio=0.5,
      JK="last",
      residual=False,
      gnn_type="gin",
  ):
      """
      emb_dim (int): node embedding dimensionality
      """
  
      super(GNN_node_Virtualnode, self).__init__()
      self.num_layer = num_layer
      self.drop_ratio = drop_ratio
      self.JK = JK
      ### add residual connection or not
      self.residual = residual
  
      if self.num_layer < 2:
          raise ValueError(
              "Number of GNN layers must be greater than 1."
          )
  
      self.node_encoder = torch.nn.Embedding(
          1, emb_dim
      )  # uniform input node embedding
  
      ### set the initial virtual node embedding to 0.
      self.virtualnode_embedding = torch.nn.Embedding(1, emb_dim)
      torch.nn.init.constant_(self.virtualnode_embedding.weight.data, 0)
  
      ### List of GNNs
      self.convs = torch.nn.ModuleList()
      ### batch norms applied to node embeddings
      self.batch_norms = torch.nn.ModuleList()
  
      ### List of MLPs to transform virtual node at every layer
      self.mlp_virtualnode_list = torch.nn.ModuleList()
  
      for layer in range(num_layer):
          if gnn_type == "gin":
              self.convs.append(GINConv(emb_dim))
          elif gnn_type == "gcn":
              self.convs.append(GCNConv(emb_dim))
          else:
              raise ValueError(
                  "Undefined GNN type called {}".format(gnn_type)
              )
  
          self.batch_norms.append(torch.nn.BatchNorm1d(emb_dim))
  
      for layer in range(num_layer - 1):
          self.mlp_virtualnode_list.append(
              torch.nn.Sequential(
                  torch.nn.Linear(emb_dim, 2 * emb_dim),
                  torch.nn.BatchNorm1d(2 * emb_dim),
                  torch.nn.ReLU(),
                  torch.nn.Linear(2 * emb_dim, emb_dim),
                  torch.nn.BatchNorm1d(emb_dim),
                  torch.nn.ReLU(),
              )
          )
  
imports: import torch
  from torch_geometric.nn import MessagePassing
  import torch.nn.functional
  from torch_geometric.nn import global_mean_pool, global_add_pool
  from torch_geometric.utils import degree
  import math
label_desc: Use image node_id 1 to create a new GNN_node_Virtualnode object from inherited base classes: torch.nn with example: obj = GNN_node_Virtualnode(num_layer, emb_dim, drop_ratio, JK, residual, gnn_type)