code: def train(model, feats, labels, loss_fcn, optimizer, train_loader):
      model.train()
      device = labels.device
      for batch in train_loader:
          batch_feats = [x[batch].to(device) for x in feats]
          loss = loss_fcn(model(batch_feats), labels[batch])
          optimizer.zero_grad()
          loss.backward()
          optimizer.step()
  
imports: import argparse
  import time
  import dgl
  import dgl.function
  import numpy
  import torch
  import torch.nn
  from dataset import load_dataset
label_desc: Use image node_id 4 for calling a global function with example usage: train(model, feats, labels, loss_fcn, optimizer, train_loader) without return types