code: def train():
      model.train()
  
      for i, batch in enumerate(train_loader):
          start = time.perf_counter()
          batch = batch.to(device)
          optimizer.zero_grad()
          out = model(batch.x, batch.edge_index)[: batch.batch_size]
          y = batch.y[: batch.batch_size].view(-1).to(torch.long)
          loss = F.cross_entropy(out, y)
          loss.backward()
          optimizer.step()
  
          if i % 10 == 0:
              print(
                  f"Epoch: {epoch:02d}, Iteration: {i}, Loss: {loss:.4f}, "
                  f"s/iter: {time.perf_counter() - start:.6f}"
              )
  
file_path: pytorch_geometric/examples/ogbn_papers_100m.py
imports: import os
  import time
  from typing import Optional
  import torch
  import torch.nn.functional
  from ogb.nodeproppred import PygNodePropPredDataset
  from torch_geometric.loader import NeighborLoader
  from torch_geometric.nn import GCNConv
label_desc: Use image node_id 2 for calling a global function with example usage: train() without return types