code: def get_negative_edges(positive_edges, num_nodes, num_negative_edges):
      positive_edge_set = []
      positive_edges = to_bidirected(positive_edges)
      for i in range(positive_edges.shape[1]):
          positive_edge_set.append(tuple(positive_edges[:, i]))
      positive_edge_set = set(positive_edge_set)
  
      negative_edges = np.zeros(
          (2, num_negative_edges), dtype=positive_edges.dtype
      )
      for i in range(num_negative_edges):
          while True:
              mask_temp = tuple(
                  np.random.choice(num_nodes, size=(2,), replace=False)
              )
              if mask_temp not in positive_edge_set:
                  negative_edges[:, i] = mask_temp
                  break
  
      return negative_edges
  
imports: import multiprocessing
  import random
  from multiprocessing import get_context
  import networkx
  import numpy
  import torch
  from tqdm.auto import tqdm
label_desc: Use image node_id 5 for calling a global function with example usage: get_negative_edges(positive_edges, num_nodes, num_negative_edges) and returns: negative_edges