code: def train(model, data, train_idx, optimizer):
      model.train()
      criterion = torch.nn.BCEWithLogitsLoss()
  
      optimizer.zero_grad()
      out = model(data.x, data.adj_t)[train_idx]
      loss = criterion(out, data.y[train_idx].to(torch.float))
      loss.backward()
      optimizer.step()
  
      return loss.item()
  
file_path: ogb/examples/nodeproppred/proteins/gnn.py
imports: import argparse
  import torch
  import torch.nn.functional
  import torch_geometric.transforms
  from torch_geometric.nn import GCNConv, SAGEConv
  from ogb.nodeproppred import PygNodePropPredDataset, Evaluator
  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