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"]
docstr: Get next batch
  
  Returns
  -------
  DGLGraph
      Sampled positive graph
  ChunkNegEdgeSubgraph
      Negative graph wrapper
docstr_tok: ["Get","next","batch","Returns","--","--","--","-","DGLGraph","Sampled","positive","graph","ChunkNegEdgeSubgraph","Negative","graph","wrapper"]
code: def __next__(self):
      """Get next batch
  
      Returns
      -------
      DGLGraph
          Sampled positive graph
      ChunkNegEdgeSubgraph
          Negative graph wrapper
      """
      if self.cnt == self.num_edges:
          raise StopIteration
      beg = self.cnt
      if self.cnt + self.batch_size > self.num_edges:
          self.cnt = self.num_edges
      else:
          self.cnt += self.batch_size
      if self.mode == "t,r->h":
          return (
              F.tensor(
                  self.edges["t,r->h"]["tr"][beg : self.cnt], F.int64
              ),
              F.tensor(
                  self.edges["t,r->h"]["h_correct_index"][
                      beg : self.cnt
                  ],
                  F.int64,
              ),
              F.tensor(
                  self.edges["t,r->h"]["h_candidate"][beg : self.cnt],
                  F.int64,
              ),
          )
      elif self.mode == "h,r->t":
          return (
              F.tensor(
                  self.edges["h,r->t"]["hr"][beg : self.cnt], F.int64
              ),
              F.tensor(
                  self.edges["h,r->t"]["t_correct_index"][
                      beg : self.cnt
                  ],
                  F.int64,
              ),
              F.tensor(
                  self.edges["h,r->t"]["t_candidate"][beg : self.cnt],
                  F.int64,
              ),
          )
  
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 3 for calling the WikiEvalSampler obj's underlying member method code with example usage: obj.__next__() and returns: F,  F,  F, F,  F,  F