code: def training_step(self, batch, batch_idx):
      input_nodes, output_nodes, mfgs = batch
      mfgs = [mfg.int().to(device) for mfg in mfgs]
      self.num_steps += 1
      for i, mfg in enumerate(mfgs):
          self.cum_sampled_nodes[i] = (
              self.cum_sampled_nodes[i] * self.w + mfg.num_src_nodes()
          )
          self.cum_sampled_edges[i] = (
              self.cum_sampled_edges[i] * self.w + mfg.num_edges()
          )
          self.log(
              "num_nodes/{}".format(i),
              self.num_sampled_nodes(i),
              prog_bar=True,
              on_step=True,
              on_epoch=False,
          )
          self.log(
              "num_edges/{}".format(i),
              self.num_sampled_edges(i),
              prog_bar=True,
              on_step=True,
              on_epoch=False,
          )
      # for batch size monitoring
      i = len(mfgs)
      self.cum_sampled_nodes[i] = (
          self.cum_sampled_nodes[i] * self.w + mfgs[-1].num_dst_nodes()
      )
      self.log(
          "num_nodes/{}".format(i),
          self.num_sampled_nodes(i),
          prog_bar=True,
          on_step=True,
          on_epoch=False,
      )
  
      batch_inputs = mfgs[0].srcdata["features"]
      batch_labels = mfgs[-1].dstdata["labels"]
      self.st = time.time()
      batch_pred = self.module(mfgs, batch_inputs)
      loss = self.loss_fn(batch_pred, batch_labels)
      self.train_acc(batch_pred, batch_labels.int())
      self.log(
          "train_acc",
          self.train_acc,
          prog_bar=True,
          on_step=True,
          on_epoch=True,
          batch_size=batch_labels.shape[0],
      )
      self.log(
          "train_loss",
          loss,
          on_step=True,
          on_epoch=True,
          batch_size=batch_labels.shape[0],
      )
      t = time.time()
      self.log(
          "iter_time",
          t - self.pt,
          prog_bar=True,
          on_step=True,
          on_epoch=False,
      )
      self.pt = t
      return loss
  
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 4 for calling the SAGELightning obj's underlying member method code with example usage: obj.training_step(batch, batch_idx) and returns: loss