code: def main():
      dataset = OGB_MAG(
          osp.join("data", "OGB"),
          preprocess="metapath2vec",
          transform=T.ToUndirected(merge=False),
      )
      data = dataset[0]
  
      datamodule = LightningNodeData(
          data,
          input_train_nodes=("paper", data["paper"].train_mask),
          input_val_nodes=("paper", data["paper"].val_mask),
          input_test_nodes=("paper", data["paper"].test_mask),
          loader="neighbor",
          num_neighbors=[10, 10],
          batch_size=1024,
          num_workers=8,
      )
  
      model = RelationalGNN(
          data.metadata(),
          hidden_channels=64,
          out_channels=349,
          dropout=0.0,
      )
  
      with torch.no_grad():  # Run a dummy forward pass to initialize lazy model
          loader = datamodule.train_dataloader()
          batch = next(iter(loader))
          model.common_step(batch)
  
      strategy = pl.strategies.SingleDeviceStrategy("cuda:0")
      checkpoint = ModelCheckpoint(
          monitor="val_acc", save_top_k=1, mode="max"
      )
      trainer = Trainer(
          strategy=strategy,
          devices=1,
          max_epochs=20,
          log_every_n_steps=5,
          callbacks=[checkpoint],
      )
  
      trainer.fit(model, datamodule)
      trainer.test(ckpt_path="best", datamodule=datamodule)
  
imports: import os.path
  from typing import Dict, List, Tuple
  import pytorch_lightning
  import torch
  import torch.nn.functional
  from pytorch_lightning import LightningModule, Trainer
  from pytorch_lightning.callbacks import ModelCheckpoint
  from torch import Tensor
  from torchmetrics import Accuracy
  import torch_geometric.transforms
  from torch_geometric.data import Batch
  from torch_geometric.data.lightning import LightningNodeData
  from torch_geometric.datasets import OGB_MAG
  from torch_geometric.nn import Linear, SAGEConv, to_hetero
  from torch_geometric.typing import EdgeType, NodeType
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types