class_docstr: Sampler for validation and testing
  
  Parameters
  ----------
  g : DGLGraph
      Graph containing KG graph
  edges : tensor
      Seed edges
  batch_size : int
      Batch size of each mini batch.
  neg_sample_size : int
      How many negative edges sampled for each node.
  neg_chunk_size : int
      How many edges in one chunk. We split one batch into chunks.
  mode : str
      Sampling mode.
  number_workers: int
      Number of workers used in parallel for this sampler
  filter_false_neg : bool
      If True, exlucde true positive edges in sampled negative edges
      If False, return all sampled negative edges even there are positive edges
      Default: True
class_docstr_tok: ["Sampler","for","validation","and","testing","Parameters","--","--","--","--","--","g",":","DGLGraph","Graph","containing","KG","graph","edges",":","tensor","Seed","edges","batch_size",":","int","Batch","size","of","each","mini","batch",".","neg_sample_size",":","int","How","many","negative","edges","sampled","for","each","node",".","neg_chunk_size",":","int","How","many","edges","in","one","chunk",".","We","split","one","batch","into","chunks",".","mode",":","str","Sampling","mode",".","number_workers",":","int","Number","of","workers","used","in","parallel","for","this","sampler","filter_false_neg",":","bool","If","True",",","exlucde","true","positive","edges","in","sampled","negative","edges","If","False",",","return","all","sampled","negative","edges","even","there","are","positive","edges","Default",":","True"]
code: def __init__(
      self,
      g,
      edges,
      batch_size,
      neg_sample_size,
      neg_chunk_size,
      mode,
      num_workers=32,
      filter_false_neg=True,
  ):
      EdgeSampler = getattr(dgl.contrib.sampling, "EdgeSampler")
      self.sampler = EdgeSampler(
          g,
          batch_size=batch_size,
          seed_edges=edges,
          neg_sample_size=neg_sample_size,
          chunk_size=neg_chunk_size,
          negative_mode=mode,
          num_workers=num_workers,
          shuffle=False,
          exclude_positive=False,
          relations=g.edata["tid"],
          return_false_neg=filter_false_neg,
      )
      self.sampler_iter = iter(self.sampler)
      self.mode = mode
      self.neg_head = "head" in mode
      self.g = g
      self.filter_false_neg = filter_false_neg
      self.neg_chunk_size = neg_chunk_size
      self.neg_sample_size = neg_sample_size
  
imports: import math
  import numpy
  import scipy
  import dgl.backend
  import dgl
  import os
  import sys
  import pickle
  import time
  from dgl.base import NID, EID
  import pdb
label_desc: Use image node_id 1 to create a new EvalSampler object from inherited base classes: object with example: obj = EvalSampler(g, edges, batch_size, neg_sample_size, neg_chunk_size, mode, num_workers, filter_false_neg)