code: def train(model, g, A_norm, H):
      label = g.ndata["label"]
      train_mask = g.ndata["train_mask"]
      val_mask = g.ndata["val_mask"]
      test_mask = g.ndata["test_mask"]
      optimizer = Adam(model.parameters(), lr=0.01, weight_decay=5e-4)
  
      loss_fcn = nn.CrossEntropyLoss()
  
      for epoch in range(100):
          model.train()
          optimizer.zero_grad()
  
          # Forward.
          logits = model(A_norm, H)
  
          # Compute loss with nodes in the training set.
          loss = loss_fcn(logits[train_mask], label[train_mask])
  
          # Backward.
          loss.backward()
          optimizer.step()
  
          # Evaluate the prediction.
          val_acc, test_acc = evaluate(
              model, A_norm, H, label, val_mask, test_mask
          )
          if epoch % 5 == 0:
              print(
                  f"In epoch {epoch}, loss: {loss:.3f}, val acc: {val_acc:.3f}"
                  f", test acc: {test_acc:.3f}"
              )
  
file_path: dgl/examples/sparse/gcnii.py
imports: import math
  import dgl.sparse
  import torch
  import torch.nn
  import torch.nn.functional
  from dgl.data import CoraGraphDataset
  from torch.optim import Adam
label_desc: Use image node_id 2 for calling a global function with example usage: train(model, g, A_norm, H) without return types