code: def train():
      model.train()
      model.set_aggr("add" if args.use_normalization else "mean")
  
      total_loss = total_examples = 0
      for data in loader:
          data = data.to(device)
          optimizer.zero_grad()
  
          if args.use_normalization:
              edge_weight = data.edge_norm * data.edge_weight
              out = model(data.x, data.edge_index, edge_weight)
              loss = F.nll_loss(out, data.y, reduction="none")
              loss = (loss * data.node_norm)[data.train_mask].sum()
          else:
              out = model(data.x, data.edge_index)
              loss = F.nll_loss(
                  out[data.train_mask], data.y[data.train_mask]
              )
  
          loss.backward()
          optimizer.step()
          total_loss += loss.item() * data.num_nodes
          total_examples += data.num_nodes
      return total_loss / total_examples
  
file_path: pytorch_geometric/examples/graph_saint.py
imports: import argparse
  import os.path
  import torch
  import torch.nn.functional
  from torch_geometric.datasets import Flickr
  from torch_geometric.loader import GraphSAINTRandomWalkSampler
  from torch_geometric.nn import GraphConv
  from torch_geometric.typing import WITH_TORCH_SPARSE
  from torch_geometric.utils import degree
label_desc: Use image node_id 1 for calling a global function with example usage: train() and returns: unknown