code: def evaluate(model, dataloader, evaluator, device):
      model.eval()
      y_true = []
      y_pred = []
      for batched_g, labels in dataloader:
          batched_g, labels = batched_g.to(device), labels.to(device)
          y_hat = model(
              batched_g, batched_g.ndata["feat"], batched_g.ndata["PE"]
          )
          y_true.append(labels.view(y_hat.shape).detach().cpu())
          y_pred.append(y_hat.detach().cpu())
      y_true = torch.cat(y_true, dim=0).numpy()
      y_pred = torch.cat(y_pred, dim=0).numpy()
      input_dict = {"y_true": y_true, "y_pred": y_pred}
      return evaluator.eval(input_dict)["rocauc"]
  
imports: import dgl
  import dgl.nn
  import dgl.sparse
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from dgl.data import AsGraphPredDataset
  from dgl.dataloading import GraphDataLoader
  from ogb.graphproppred import collate_dgl, DglGraphPropPredDataset, Evaluator
  from ogb.graphproppred.mol_encoder import AtomEncoder
  from tqdm import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: evaluate(model, dataloader, evaluator, device) and returns: evaluator