code: def train(model, device, train_loader, optimizer):
      model.train()
  
      total_loss = 0
      for x, y in tqdm(train_loader):
          x, y = x.to(device), y.to(device)
          optimizer.zero_grad()
          out = model(x)
          loss = F.nll_loss(out, y.squeeze(1))
          loss.backward()
          optimizer.step()
          total_loss += loss.item() * x.size(0)
      return total_loss / len(train_loader.dataset)
  
file_path: ogb/examples/nodeproppred/papers100M/mlp.py
imports: import argparse
  from tqdm.auto import tqdm
  import torch
  import torch.nn.functional
  from torch.utils.data import Dataset, DataLoader
  from ogb.nodeproppred import Evaluator
  from logger import Logger
label_desc: Use image node_id 1 for calling a global function with example usage: train(model, device, train_loader, optimizer) and returns: unknown