code: def get_dataset(args):
      # Generate graph data
      data_info = get_communities(args.inductive)
      # Get positive and negative edges
      data = get_pos_neg_edges(
          data_info,
          infer_link_positive=True if args.task == "link" else False,
      )
      # Pre-compute shortest path length
      if args.task == "link":
          dists_removed = precompute_dist_data(
              data["positive_edges_train"],
              data["num_nodes"],
              approximate=args.k_hop_dist,
          )
          data["dists"] = torch.from_numpy(dists_removed).float()
          data["edge_index"] = torch.from_numpy(
              to_bidirected(data["positive_edges_train"])
          ).long()
      else:
          dists = precompute_dist_data(
              data["edge_index"].numpy(),
              data["num_nodes"],
              approximate=args.k_hop_dist,
          )
          data["dists"] = torch.from_numpy(dists).float()
  
      return data
  
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 11 for calling a global function with example usage: get_dataset(args) and returns: data