code: def __init__(self, g, k, neg_share=False):
      self.weights = g.in_degrees().float() ** 0.75
      self.k = k
      self.neg_share = neg_share
  
imports: import time
  import dgl
  import dgl.function
  import dgl.nn.pytorch
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from ..None import utils
label_desc: Use image node_id 1 to create a new NegativeSampler object from inherited base classes: object with example: obj = NegativeSampler(g, k, neg_share)