code: def test(model, loaders):
      global best_model
      global best_val
      model.eval()
      accs = []
      for loader in loaders:
          for batch in loader:
              batch.to(device)
              logits = model(batch)
              total = 0
              acc = 0
              for node_type in logits:
                  node_idx = batch.node_label_index[node_type].to(
                      device
                  )
                  pred = logits[node_type][node_idx]
                  pred = pred.max(1)[1]
                  acc += (
                      pred.eq(batch.node_label[node_type].to(device))
                      .sum()
                      .item()
                  )
                  total += pred.size(0)
              acc /= total
              accs.append(acc)
      if accs[1] > best_val:
          best_val = accs[1]
          best_model = copy.deepcopy(model)
      return accs
  
file_path: deepsnap/examples/node_classification_hetero/node_classification_syn_tensor.py
imports: import copy
  import torch
  import torch.nn
  import torch.nn.functional
  from utils import generate_convs, concatenate_citeseer_cora
  from deepsnap.hetero_gnn import HeteroConv, HeteroSAGEConv, forward_op, loss_op
  from torch_geometric.datasets import Planetoid
  from deepsnap.dataset import GraphDataset
  from deepsnap.batch import Batch
  from deepsnap.hetero_graph import HeteroGraph
  from torch.utils.data import DataLoader
label_desc: Use image node_id 2 for calling a global function with example usage: test(model, loaders) and returns: accs