code: def train(model, data, train_idx, optimizer):
      model.train()
  
      optimizer.zero_grad()
      out = model(data.x, data.adj_t)[train_idx]
      loss = F.nll_loss(out, data.y.squeeze(1)[train_idx])
      loss.backward()
      optimizer.step()
  
      return loss.item()
  
file_path: graph4nlp/graph4nlp/pytorch/test/graph_embedding/ogbn_test.py
imports: import argparse
  import torch
  import torch.nn.functional
  import torch_geometric.transforms
  from ogb.nodeproppred import Evaluator, PygNodePropPredDataset
  from torch_geometric.nn import GCNConv, SAGEConv
  from .logger import Logger
label_desc: Use image node_id 1 for calling a global function with example usage: train(model, data, train_idx, optimizer) and returns: loss