code: def train(epoch):
      model.train()
  
      pbar = tqdm(total=int(data.train_mask.sum()), disable=True)
      pbar.set_description(f"Epoch {epoch:02d}")
  
      total_loss = total_correct = 0
      for batch_size, n_id, adjs in train_loader:
          # `adjs` holds a list of `(edge_index, e_id, size)` tuples.
          adjs = [adj.to(device) for adj in adjs]
  
          optimizer.zero_grad()
          out = model(x[n_id], adjs, n_id)
          loss = F.nll_loss(out, y[n_id[:batch_size]])
          loss.backward()
          optimizer.step()
  
          total_loss += float(loss)
          total_correct += int(
              out.argmax(dim=-1).eq(y[n_id[:batch_size]]).sum()
          )
          pbar.update(batch_size)
  
      pbar.close()
  
      loss = total_loss / len(train_loader)
      approx_acc = total_correct / int(data.train_mask.sum())
  
      return loss, approx_acc
  
imports: import argparse
  import os.path
  import time
  import torch
  import torch.nn.functional
  from tqdm import tqdm
  from torch_geometric.datasets import Reddit, Reddit2
  from torch_geometric.nn.conv import MessagePassing
  from torch.nn import Linear
  from torch import Tensor
  from logger import Logger
  from torch_geometric.data import NeighborSampler
label_desc: Use image node_id 1 for calling a global function with example usage: train(epoch) and returns: loss,  approx_acc