code: def test(model, dataloaders, args, max_train_batches=1):
      model.eval()
      accs = {}
      losses = {}
      for mode, dataloader in dataloaders.items():
          acc = 0
          loss = 0
          num_batches = 0
          for batch in dataloader:
              batch.to(args.device)
              pred = model(batch)
              # only 1 graph in dataset. In general needs aggregation
              loss += (
                  model.loss(pred, batch.edge_label.type(pred.dtype))
                  .cpu()
                  .data.numpy()
              )
              acc += roc_auc_score(
                  batch.edge_label.flatten().cpu().numpy(),
                  pred.flatten().data.cpu().numpy(),
              )
              num_batches += 1
              if mode == "train" and num_batches >= max_train_batches:
                  # do not eval on the entire training set for efficiency
                  break
          accs[mode] = acc / num_batches
          losses[mode] = loss / num_batches
      return accs, losses
  
imports: import sys
  import argparse
  from converter import *
  import copy
  import math
  import time
  import numpy
  from sklearn.metrics import *
  import torch
  import torch.nn.functional
  from torch.utils.data import DataLoader
  from torch_geometric.datasets import Planetoid
  from torch_geometric.datasets import TUDataset
  import torch_geometric.transforms
  import torch_geometric.nn
  from deepsnap.graph import Graph
  from deepsnap.dataset import GraphDataset
  from deepsnap.batch import Batch
  import pdb
label_desc: Use image node_id 3 for calling a global function with example usage: test(model, dataloaders, args, max_train_batches) and returns: accs,  losses