def METHOD_NAME(self, test_data, device, args):
    logging.info("----------test--------")
    model = self.model
    model.eval()
    model.to(device)
    with torch.no_grad():
        y_pred = []
        y_true = []
        masks = []
        for mol_idx, (adj_matrix, feature_matrix, label, mask) in enumerate(
            test_data
        ):
            adj_matrix = adj_matrix.to(
                device=device, dtype=torch.float32, non_blocking=True
            )
            feature_matrix = feature_matrix.to(
                device=device, dtype=torch.float32, non_blocking=True
            )
            logits = model(adj_matrix, feature_matrix)
            y_pred.append(logits.cpu().numpy())
            y_true.append(label.cpu().numpy())
            masks.append(mask.numpy())
    y_pred = np.array(y_pred)
    y_true = np.array(y_true)
    masks = np.array(masks)
    results = []
    for label in range(masks.shape[1]):
        valid_idxs = np.nonzero(masks[:, label])
        truth = y_true[valid_idxs, label].flatten()
        pred = y_pred[valid_idxs, label].flatten()
        if np.all(truth == 0.0) or np.all(truth == 1.0):
            results.append(float("nan"))
        else:
            if args.metric == "prc-auc":
                precision, recall, _ = precision_recall_curve(truth, pred)
                score = auc(recall, precision)
            else:
                score = roc_auc_score(truth, pred)
            results.append(score)
    score = np.nanmean(results)
    return score, model