code: def neg_sampling_transform(data):
      """
      Do negative sampling for link prediction tasks
  
      Args:
          data (torch_geometric.data): Input data object
  
      Returns: Transformed data object with negative edges + link pred labels
  
      """
      train_neg_edge_index = negative_sampling(
          edge_index=data.train_pos_edge_index,
          num_nodes=data.num_nodes,
          num_neg_samples=data.train_pos_edge_index.size(1),
      )
      data.train_edge_index = torch.cat(
          [data.train_pos_edge_index, train_neg_edge_index], dim=-1
      )
      data.train_edge_label = create_link_label(
          data.train_pos_edge_index, train_neg_edge_index
      )
  
      return data
  
file_path: GraphGym/graphgym/models/transform.py
imports: import networkx
  import torch
  from torch_geometric.utils import negative_sampling
label_desc: Use image node_id 6 for calling a global function with example usage: neg_sampling_transform(data) and returns: data