code: def __init__(
      self,
      dataset_name,
      undirected,
      data_cpu=False,
      use_uva=False,
      fan_out=[10, 25],
      lad_out=[11000, 5000],
      device=th.device("cpu"),
      batch_size=1000,
      num_workers=4,
      sampler="labor",
      importance_sampling=0,
      layer_dependency=False,
      batch_dependency=1,
      cache_size=0,
  ):
      super().__init__()
  
      g, n_classes, multilabel = load_dataset(dataset_name)
      if undirected:
          src, dst = g.all_edges()
          g.add_edges(dst, src)
      cast_to_int = max(g.num_nodes(), g.num_edges()) <= 2e9
      if cast_to_int:
          g = g.int()
  
      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["test_mask"], as_tuple=True)[0]
  
      fanouts = [int(_) for _ in fan_out]
      ladouts = [int(_) for _ in lad_out]
      if sampler == "neighbor":
          sampler = dgl.dataloading.NeighborSampler(
              fanouts,
              prefetch_node_feats=["features"],
              prefetch_edge_feats=["etype"]
              if "etype" in g.edata
              else [],
              prefetch_labels=["labels"],
          )
      elif "ladies" in sampler:
          g.edata["w"] = normalized_edata(g)
          sampler = (
              PoissonLadiesSampler
              if "poisson" in sampler
              else LadiesSampler
          )(ladouts)
      else:
          sampler = dgl.dataloading.LaborSampler(
              fanouts,
              importance_sampling=importance_sampling,
              layer_dependency=layer_dependency,
              batch_dependency=batch_dependency,
              prefetch_node_feats=["features"],
              prefetch_edge_feats=["etype"]
              if "etype" in g.edata
              else [],
              prefetch_labels=["labels"],
          )
  
      dataloader_device = th.device("cpu")
      g = g.formats(["csc"])
      if use_uva or not data_cpu:
          train_nid = train_nid.to(device)
          val_nid = val_nid.to(device)
          test_nid = test_nid.to(device)
          if not data_cpu and not use_uva:
              g = g.to(device)
          dataloader_device = device
  
      self.g = g
      self.train_nid = train_nid.to(g.idtype)
      self.val_nid = val_nid.to(g.idtype)
      self.test_nid = test_nid.to(g.idtype)
      self.sampler = sampler
      self.device = dataloader_device
      self.use_uva = use_uva
      self.batch_size = batch_size
      self.num_workers = num_workers
      self.in_feats = g.ndata["features"].shape[1]
      self.n_classes = n_classes
      self.multilabel = multilabel
      self.gpu_cache_arg = {"node": {"features": cache_size}}
  
imports: import argparse
  import glob
  import math
  import os
  import time
  import dgl
  import torch
  import torch.nn
  import torch.nn.functional
  from ladies_sampler import LadiesSampler, normalized_edata, PoissonLadiesSampler
  from load_graph import load_dataset
  from model import SAGE
  from pytorch_lightning import LightningDataModule, LightningModule, Trainer
  from pytorch_lightning.callbacks import Callback, EarlyStopping, ModelCheckpoint
  from pytorch_lightning.loggers import TensorBoardLogger
  from torchmetrics.classification import MulticlassF1Score, MultilabelF1Score
label_desc: Use image node_id 1 to create a new DataModule object from inherited base classes: LightningDataModule with example: obj = DataModule(dataset_name, undirected, data_cpu, use_uva, fan_out, lad_out, device, batch_size, num_workers, sampler, importance_sampling, layer_dependency, batch_dependency, cache_size)