code: def step(i, j, g, lg, deg_g, deg_lg, pm_pd):
      """One step of training."""
      g = g.to(dev)
      lg = lg.to(dev)
      deg_g = deg_g.to(dev).unsqueeze(1)
      deg_lg = deg_lg.to(dev).unsqueeze(1)
      pm_pd = pm_pd.to(dev)
      t0 = time.time()
      z = model(g, lg, deg_g, deg_lg, pm_pd)
      t_forward = time.time() - t0
  
      z_list = th.chunk(z, args.batch_size, 0)
      loss = (
          sum(
              min(F.cross_entropy(z, y) for y in y_list) for z in z_list
          )
          / args.batch_size
      )
      overlap = compute_overlap(z_list)
  
      optimizer.zero_grad()
      t0 = time.time()
      loss.backward()
      t_backward = time.time() - t0
      optimizer.step()
  
      return loss, overlap, t_forward, t_backward
  
file_path: dgl/examples/pytorch/line_graph/train.py
imports: from __future__ import division
  import argparse
  import time
  from itertools import permutations
  import gnn
  import numpy
  import torch
  import torch.nn.functional
  import torch.optim
  from dgl.data import SBMMixtureDataset
  from torch.utils.data import DataLoader
label_desc: Use image node_id 3 for calling a global function with example usage: step(i, j, g, lg, deg_g, deg_lg, pm_pd) and returns: loss,  overlap,  t_forward,  t_backward