code: def __init__(
      self,
      feat_dim,
      hidden_dim,
      num_feat_layers=1,
      num_conv_layers=3,
      num_fc_layers=2,
      xg_dim=None,
      bn=True,
      gfn=False,
      collapse=False,
      residual=False,
      global_pool="sum",
      dropout=0,
      edge_norm=True,
  ):
      super(ResGCN, self).__init__()
      assert (
          num_feat_layers == 1
      ), "more feat layers are not now supported"
      self.conv_residual = residual
      self.fc_residual = False  # no skip-connections for fc layers.
      self.collapse = collapse
      self.bn = bn
  
      assert "sum" in global_pool or "mean" in global_pool, global_pool
      if "sum" in global_pool:
          self.global_pool = global_add_pool
      else:
          self.global_pool = global_mean_pool
      self.dropout = dropout
      GConv = partial(ResGCNConv, edge_norm=edge_norm, gfn=gfn)
  
      if xg_dim is not None:  # Utilize graph level features.
          self.use_xg = True
          self.bn1_xg = BatchNorm1d(xg_dim)
          self.lin1_xg = Linear(xg_dim, hidden_dim)
          self.bn2_xg = BatchNorm1d(hidden_dim)
          self.lin2_xg = Linear(hidden_dim, hidden_dim)
      else:
          self.use_xg = False
  
      if collapse:
          self.bn_feat = BatchNorm1d(feat_dim)
          self.bns_fc = torch.nn.ModuleList()
          self.lins = torch.nn.ModuleList()
          if "gating" in global_pool:
              self.gating = torch.nn.Sequential(
                  Linear(feat_dim, feat_dim),
                  torch.nn.ReLU(),
                  Linear(feat_dim, 1),
                  torch.nn.Sigmoid(),
              )
          else:
              self.gating = None
          for i in range(num_fc_layers - 1):
              self.bns_fc.append(BatchNorm1d(hidden_in))
              self.lins.append(Linear(hidden_in, hidden_dim))
              hidden_in = hidden_dim
      else:
          self.bn_feat = BatchNorm1d(feat_dim)
          feat_gfn = True  # set true so GCNConv is feat transform
          self.conv_feat = ResGCNConv(
              feat_dim, hidden_dim, gfn=feat_gfn
          )
          if "gating" in global_pool:
              self.gating = torch.nn.Sequential(
                  Linear(hidden_dim, hidden_dim),
                  torch.nn.ReLU(),
                  Linear(hidden_dim, 1),
                  torch.nn.Sigmoid(),
              )
          else:
              self.gating = None
          self.bns_conv = torch.nn.ModuleList()
          self.convs = torch.nn.ModuleList()
          for i in range(num_conv_layers):
              self.bns_conv.append(BatchNorm1d(hidden_dim))
              self.convs.append(GConv(hidden_dim, hidden_dim))
          self.bn_hidden = BatchNorm1d(hidden_dim)
          self.bns_fc = torch.nn.ModuleList()
          self.lins = torch.nn.ModuleList()
          for i in range(num_fc_layers - 1):
              self.bns_fc.append(BatchNorm1d(hidden_dim))
              self.lins.append(Linear(hidden_dim, hidden_dim))
  
      # BN initialization.
      for m in self.modules():
          if isinstance(m, (torch.nn.BatchNorm1d)):
              torch.nn.init.constant_(m.weight, 1)
              torch.nn.init.constant_(m.bias, 0.0001)
  
imports: from functools import partial
  import torch
  import torch.nn.functional
  from torch.nn import Parameter
  from torch.nn import Sequential, Linear, BatchNorm1d
  from torch_scatter import scatter_add
  from torch_geometric.nn import GINConv, GCNConv, global_add_pool, global_mean_pool
  from torch_geometric.nn.conv import MessagePassing
  from torch_geometric.utils import remove_self_loops, add_self_loops
  from torch_geometric.nn.inits import glorot, zeros
label_desc: Use image node_id 1 to create a new ResGCN object from inherited base classes: torch.nn with example: obj = ResGCN(feat_dim, hidden_dim, num_feat_layers, num_conv_layers, num_fc_layers, xg_dim, bn, gfn, collapse, residual, global_pool, dropout, edge_norm)