code: def __init__(
      self,
      dataset_name,
      data_cpu=False,
      fan_out=[10, 25],
      device=th.device("cpu"),
      batch_size=1000,
      num_workers=4,
  ):
      super().__init__()
      if dataset_name == "reddit":
          g, n_classes = load_reddit()
          n_edges = g.num_edges()
          reverse_eids = th.cat(
              [
                  th.arange(n_edges // 2, n_edges),
                  th.arange(0, n_edges // 2),
              ]
          )
      elif dataset_name == "ogbn-products":
          g, n_classes = load_ogb("ogbn-products")
          n_edges = g.num_edges()
          # The reverse edge of edge 0 in OGB products dataset is 1.
          # The reverse edge of edge 2 is 3.  So on so forth.
          reverse_eids = th.arange(n_edges) ^ 1
      else:
          raise ValueError("unknown dataset")
  
      train_nid = th.nonzero(g.ndata["train_mask"], as_tuple=True)[0]
      val_nid = th.nonzero(g.ndata["val_mask"], as_tuple=True)[0]
      test_nid = th.nonzero(
          ~(g.ndata["train_mask"] | g.ndata["val_mask"]), as_tuple=True
      )[0]
  
      sampler = dgl.dataloading.MultiLayerNeighborSampler(
          [int(_) for _ in fan_out]
      )
  
      dataloader_device = th.device("cpu")
      if not data_cpu:
          train_nid = train_nid.to(device)
          val_nid = val_nid.to(device)
          test_nid = test_nid.to(device)
          g = g.formats(["csc"])
          g = g.to(device)
          dataloader_device = device
  
      self.g = g
      self.train_nid, self.val_nid, self.test_nid = (
          train_nid,
          val_nid,
          test_nid,
      )
      self.sampler = sampler
      self.device = dataloader_device
      self.batch_size = batch_size
      self.num_workers = num_workers
      self.in_feats = g.ndata["features"].shape[1]
      self.n_classes = n_classes
      self.reverse_eids = reverse_eids
  
imports: import argparse
  import glob
  import os
  import sys
  import time
  import dgl
  import dgl.function
  import dgl.nn.pytorch
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  import tqdm
  from model import compute_acc_unsupervised, SAGE
  from negative_sampler import NegativeSampler
  from pytorch_lightning import LightningDataModule, LightningModule, Trainer
  from pytorch_lightning.callbacks import Callback, ModelCheckpoint
  from load_graph import inductive_split, load_ogb, load_reddit
label_desc: Use image node_id 1 to create a new DataModule object from inherited base classes: LightningDataModule with example: obj = DataModule(dataset_name, data_cpu, fan_out, device, batch_size, num_workers)