code: def __init__(self, config):
      super(GNN, self).__init__()
      log.info("model_type is %s" % self.__class__.__name__)
  
      self.config = config
      self.pretrain_tasks = config.pretrain_tasks.split(",")
      self.num_layers = config.num_layers
      self.drop_ratio = config.drop_ratio
      self.JK = config.JK
      self.block_num = config.block_num
      self.emb_dim = config.emb_dim
      self.num_tasks = config.num_tasks
      self.residual = config.residual
      self.graph_pooling = config.graph_pooling
  
      if self.num_layers < 2:
          raise ValueError(
              "Number of GNN layers must be greater than 1."
          )
  
      ### GNN to generate node embeddings
      self.gnn_blocks = paddle.nn.LayerList()
      for i in range(self.config.block_num):
          self.gnn_blocks.append(
              getattr(CONV, self.config.gnn_type)(config)
          )
  
      hidden_size = self.emb_dim * self.block_num
      ### Pooling function to generate whole-graph embeddings
      if self.config.graph_pooling == "bisop":
          pass
      else:
          self.pool = MeanGlobalPool()
  
      if self.config.clf_layers == 3:
          log.info("clf_layers is 3")
          self.graph_pred_linear = nn.Sequential(
              L.Linear(hidden_size, hidden_size // 2),
              L.batch_norm_1d(hidden_size // 2),
              nn.Swish(),
              L.Linear(hidden_size // 2, hidden_size // 4),
              L.batch_norm_1d(hidden_size // 4),
              nn.Swish(),
              L.Linear(hidden_size // 4, self.num_tasks),
          )
      elif self.config.clf_layers == 2:
          log.info("clf_layers is 2")
          self.graph_pred_linear = nn.Sequential(
              L.Linear(hidden_size, hidden_size // 2),
              L.batch_norm_1d(hidden_size // 2),
              nn.Swish(),
              L.Linear(hidden_size // 2, self.num_tasks),
          )
      else:
          self.graph_pred_linear = L.Linear(hidden_size, self.num_tasks)
  
      if "Con" in self.pretrain_tasks:
          self.context_loss = nn.CrossEntropyLoss()
          self.contextmlp = nn.Sequential(
              L.Linear(self.emb_dim, self.emb_dim // 2),
              L.batch_norm_1d(self.emb_dim // 2),
              nn.Swish(),
              L.Linear(self.emb_dim // 2, 5000),
          )
      if "Ba" in self.pretrain_tasks:
          self.pretrain_bond_angle = PretrainBondAngle(config)
      if "Bl" in self.pretrain_tasks:
          self.pretrain_bond_length = PretrainBondLength(config)
  
imports: import os
  import sys
  import math
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import pgl.nn
  from pgl.utils.logger import log
  import models.conv
  import models.mol_encoder
  import models.layers
label_desc: Use image node_id 1 to create a new GNN object from inherited base classes: paddle.nn with example: obj = GNN(config)