class_docstr: 1. Generate positive and negative samples
  2. Subgraph sampling
  
  Attributes:
      g(dgl.DGLGraph): graph
      split_edge(dict): split edge
      hop(int): num of hop
      neg_samples(int): num of negative samples per positive sample
      subsample_ratio(float): ratio of subsample
      use_coalesce(bool): True for coalesce graph. Graph with multi-edge need to coalesce
class_docstr_tok: ["1",".","Generate","positive","and","negative","samples","2",".","Subgraph","sampling","Attributes",":","g","(","dgl.DGLGraph",")",":","graph","split_edge","(","dict",")",":","split","edge","hop","(","int",")",":","num","of","hop","neg_samples","(","int",")",":","num","of","negative","samples","per","positive","sample","subsample_ratio","(","float",")",":","ratio","of","subsample","use_coalesce","(","bool",")",":","True","for","coalesce","graph",".","Graph","with","multi-edge","need","to","coalesce"]
code: def __call__(self, split_type):
      if split_type == "train":
          subsample_ratio = self.subsample_ratio
      else:
          subsample_ratio = 1
  
      path = osp.join(
          self.save_dir or "",
          "{}_{}_{}-hop_{}-subsample.bin".format(
              self.prefix, split_type, self.hop, subsample_ratio
          ),
      )
  
      if osp.exists(path):
          self.print_fn(
              "Load existing processed {} files".format(split_type)
          )
          graph_list, data = dgl.load_graphs(path)
          dataset = GraphDataSet(graph_list, data["labels"])
  
      else:
          self.print_fn(
              "Processed {} files not exist.".format(split_type)
          )
  
          edges, labels = self.generator(split_type)
          self.print_fn(
              "Generate {} edges totally.".format(edges.size(0))
          )
  
          graph_list, labels = self.sampler(edges, labels)
          dataset = GraphDataSet(graph_list, labels)
          dgl.save_graphs(path, graph_list, {"labels": labels})
          self.print_fn("Save preprocessed subgraph to {}".format(path))
      return dataset
  
imports: import os.path
  from copy import deepcopy
  import dgl
  import torch
  from dgl import add_self_loop, DGLGraph, NID
  from dgl.dataloading.negative_sampler import Uniform
  from torch.utils.data import DataLoader, Dataset
  from tqdm import tqdm
  from utils import drnl_node_labeling
label_desc: Use image node_id 2 for calling the SEALData obj's underlying member method code with example usage: obj.__call__(split_type) and returns: dataset