code: def train():
      model.train()
      loss_fnt = BCEWithLogitsLoss()
      total_loss = 0
      pbar = tqdm(train_loader, ncols=70)
      for batch in pbar:
          g, z, x, edge_weights, y = [
              item.to(device) if item is not None else None
              for item in batch
          ]
          optimizer.zero_grad()
          logits = model(g, z, x, edge_weight=edge_weights)
          loss = loss_fnt(logits.view(-1), y.to(torch.float))
          loss.backward()
          optimizer.step()
          total_loss += loss.item() * g.batch_size
  
      return total_loss / len(train_dataset)
  
imports: import argparse
  import datetime
  import os
  import sys
  import time
  import dgl
  import torch
  from dgl.data.utils import load_graphs, save_graphs
  from dgl.dataloading import GraphDataLoader
  from ogb.linkproppred import DglLinkPropPredDataset, Evaluator
  from torch.nn import BCEWithLogitsLoss
  from torch.utils.data import Dataset
  from tqdm import tqdm
  from models import *
  from utils import *
label_desc: Use image node_id 2 for calling a global function with example usage: train() and returns: unknown