code: def get_link_labels(pos_edge_index, neg_edge_index):
      # returns a tensor:
      # [1,1,1,1,...,0,0,0,0,0,..] with the number of ones is equel to the lenght of pos_edge_index
      # and the number of zeros is equal to the length of neg_edge_index
      E = pos_edge_index.size(1) + neg_edge_index.size(1)
      link_labels = torch.zeros(E, dtype=torch.float, device=device)
      link_labels[: pos_edge_index.size(1)] = 1.0
      return link_labels
  
file_path: AutoGL/test/performance/link_prediction/pyg/model.py
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.pyg import AutoGCN, AutoGAT, AutoSAGE
  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 sklearn.metrics import roc_auc_score
label_desc: Use image node_id 1 for calling a global function with example usage: get_link_labels(pos_edge_index, neg_edge_index) and returns: link_labels