code: def train(model, g, X_sgc):
      label = g.ndata["label"]
      train_mask = g.ndata["train_mask"]
      optimizer = Adam(model.parameters(), lr=2e-1, weight_decay=5e-6)
  
      for epoch in range(20):
          # Forward.
          logits = model(X_sgc)
  
          # Compute loss with nodes in the training set.
          loss = F.cross_entropy(logits[train_mask], label[train_mask])
  
          # Backward.
          optimizer.zero_grad()
          loss.backward()
          optimizer.step()
  
          # Compute prediction.
          pred = logits.argmax(dim=1)
  
          # Evaluate the prediction.
          val_acc, test_acc = evaluate(g, pred)
          print(
              f"In epoch {epoch}, loss: {loss:.3f}, val acc: {val_acc:.3f}, test"
              f" acc: {test_acc:.3f}"
          )
  
file_path: dgl/examples/sparse/sgc.py
imports: 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 3 for calling a global function with example usage: train(model, g, X_sgc) without return types