code: def test():
      model.eval()
      perfs = []
      for prefix in ["val", "test"]:
          pos_edge_index = data[f"{prefix}_pos_edge_index"]
          neg_edge_index = data[f"{prefix}_neg_edge_index"]
  
          z = model.lp_encode(data)
          link_logits = model.lp_decode(
              z, pos_edge_index, neg_edge_index
          )
          link_probs = link_logits.sigmoid()
  
          link_labels = get_link_labels(pos_edge_index, neg_edge_index)
  
          perfs.append(
              roc_auc_score(link_labels.cpu(), link_probs.cpu())
          )
      return perfs
  
imports: import os
  import time
  import torch
  import torch.nn.functional
  import numpy
  import os.path
  import random
  from torch_geometric.datasets import Planetoid
  from torch_geometric.data import Data
  from autogl.module.model.encoders import GCNEncoderMaintainer, GATEncoderMaintainer, SAGEEncoderMaintainer
  from autogl.module.model.decoders import DotProductLinkPredictionDecoderMaintainer
  import torch_geometric.transforms
  from torch_geometric.utils import train_test_split_edges
  from torch_geometric.utils import negative_sampling
  from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
  from tqdm import tqdm
  from helper import get_encoder_decoder_hp
  from sklearn.metrics import roc_auc_score
label_desc: Use image node_id 4 for calling a global function with example usage: test() and returns: perfs