class_docstr: Generate positive and negative samples
  Attributes:
      g(dgl.DGLGraph): graph
      split_edge(dict): split edge
      neg_samples(int): num of negative samples per positive sample
      subsample_ratio(float): ratio of subsample
      shuffle(bool): if shuffle generated graph list
class_docstr_tok: ["Generate","positive","and","negative","samples","Attributes",":","g","(","dgl.DGLGraph",")",":","graph","split_edge","(","dict",")",":","split","edge","neg_samples","(","int",")",":","num","of","negative","samples","per","positive","sample","subsample_ratio","(","float",")",":","ratio","of","subsample","shuffle","(","bool",")",":","if","shuffle","generated","graph","list"]
code: def __init__(
      self,
      g,
      split_edge,
      neg_samples=1,
      subsample_ratio=0.1,
      shuffle=True,
  ):
      self.neg_sampler = Uniform(neg_samples)
      self.subsample_ratio = subsample_ratio
      self.split_edge = split_edge
      self.g = g
      self.shuffle = shuffle
  
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 1 to create a new PosNegEdgesGenerator object from inherited base classes: object with example: obj = PosNegEdgesGenerator(g, split_edge, neg_samples, subsample_ratio, shuffle)