code: def train(model, device, loader, optimizer):
      model.train()
  
      for step, batch in enumerate(tqdm(loader, desc="Iteration")):
          batch = batch.to(device)
  
          if batch.x.shape[0] == 1 or batch.batch[-1] == 0:
              pass
          else:
              pred = model(batch)
              optimizer.zero_grad()
  
              loss = multicls_criterion(
                  pred.to(torch.float32),
                  batch.y.view(
                      -1,
                  ),
              )
  
              loss.backward()
              optimizer.step()
  
file_path: ogb/examples/graphproppred/ppa/main_pyg.py
imports: import torch
  from torch_geometric.loader import DataLoader
  import torch.optim
  import torch.nn.functional
  from gnn import GNN
  from tqdm.auto import tqdm
  import argparse
  import time
  import numpy
  from ogb.graphproppred import PygGraphPropPredDataset, Evaluator
label_desc: Use image node_id 1 for calling a global function with example usage: train(model, device, loader, optimizer) without return types