code: def __init__(
      self,
      model: str,
      in_channels: int,
      out_channels: int,
      hidden_channels: int,
      num_relations: int,
      num_layers: int,
      heads: int = 4,
      dropout: float = 0.5,
  ):
      super().__init__()
      self.save_hyperparameters()
      self.model = model.lower()
      self.num_relations = num_relations
      self.dropout = dropout
  
      self.convs = ModuleList()
      self.norms = ModuleList()
      self.skips = ModuleList()
  
      if self.model == "rgat":
          self.convs.append(
              ModuleList(
                  [
                      GATConv(
                          in_channels,
                          hidden_channels // heads,
                          heads,
                          add_self_loops=False,
                      )
                      for _ in range(num_relations)
                  ]
              )
          )
  
          for _ in range(num_layers - 1):
              self.convs.append(
                  ModuleList(
                      [
                          GATConv(
                              hidden_channels,
                              hidden_channels // heads,
                              heads,
                              add_self_loops=False,
                          )
                          for _ in range(num_relations)
                      ]
                  )
              )
  
      elif self.model == "rgraphsage":
          self.convs.append(
              ModuleList(
                  [
                      SAGEConv(
                          in_channels,
                          hidden_channels,
                          root_weight=False,
                      )
                      for _ in range(num_relations)
                  ]
              )
          )
  
          for _ in range(num_layers - 1):
              self.convs.append(
                  ModuleList(
                      [
                          SAGEConv(
                              hidden_channels,
                              hidden_channels,
                              root_weight=False,
                          )
                          for _ in range(num_relations)
                      ]
                  )
              )
  
      for _ in range(num_layers):
          self.norms.append(BatchNorm1d(hidden_channels))
  
      self.skips.append(Linear(in_channels, hidden_channels))
      for _ in range(num_layers - 1):
          self.skips.append(Linear(hidden_channels, hidden_channels))
  
      self.mlp = Sequential(
          Linear(hidden_channels, hidden_channels),
          BatchNorm1d(hidden_channels),
          ReLU(inplace=True),
          Dropout(p=self.dropout),
          Linear(hidden_channels, out_channels),
      )
  
      self.train_acc = Accuracy()
      self.val_acc = Accuracy()
      self.test_acc = Accuracy()
  
imports: import argparse
  import glob
  import os
  import os.path
  import time
  from typing import List, NamedTuple, Optional
  import numpy
  import torch
  import torch.nn.functional
  from ogb.lsc import MAG240MDataset, MAG240MEvaluator
  import pytorch_lightning
  from pytorch_lightning import LightningDataModule, LightningModule, Trainer, seed_everything
  from pytorch_lightning.callbacks import ModelCheckpoint
  from torchmetrics import Accuracy
  from torch import Tensor
  from torch.nn import BatchNorm1d, Dropout, Linear, ModuleList, ReLU, Sequential
  from torch.optim.lr_scheduler import StepLR
  from torch_geometric.data import NeighborSampler
  from torch_geometric.nn import GATConv, SAGEConv
  from torch_sparse import SparseTensor
  from tqdm.auto import tqdm
  from root import ROOT
label_desc: Use image node_id 1 to create a new RGNN object from inherited base classes: LightningModule with example: obj = RGNN(model, in_channels, out_channels, hidden_channels, num_relations, num_layers, heads, dropout)