class_docstr: Grouped sampler iterator
  
  Parameters
  ----------
  dataloader_head : dgl.contrib.sampling.EdgeSampler
      EdgeSampler in head mode
  dataloader_tail : dgl.contrib.sampling.EdgeSampler
      EdgeSampler in tail mode
  neg_chunk_size : int
      How many edges in one chunk. We split one batch into chunks.
  neg_sample_size : int
      How many negative edges sampled for each node.
  is_chunked : bool
      If True, the sampled batch is chunked.
  num_nodes : int
      Total number of nodes in the whole graph.
class_docstr_tok: ["Grouped","sampler","iterator","Parameters","--","--","--","--","--","dataloader_head",":","dgl.contrib.sampling.EdgeSampler","EdgeSampler","in","head","mode","dataloader_tail",":","dgl.contrib.sampling.EdgeSampler","EdgeSampler","in","tail","mode","neg_chunk_size",":","int","How","many","edges","in","one","chunk",".","We","split","one","batch","into","chunks",".","neg_sample_size",":","int","How","many","negative","edges","sampled","for","each","node",".","is_chunked",":","bool","If","True",",","the","sampled","batch","is","chunked",".","num_nodes",":","int","Total","number","of","nodes","in","the","whole","graph","."]
code: def one_shot_iterator(
      dataloader,
      neg_chunk_size,
      neg_sample_size,
      is_chunked,
      neg_head,
      num_nodes,
      has_edge_importance=False,
  ):
      while True:
          for pos_g, neg_g in dataloader:
              neg_g = create_neg_subgraph(
                  pos_g,
                  neg_g,
                  neg_chunk_size,
                  neg_sample_size,
                  is_chunked,
                  neg_head,
                  num_nodes,
              )
              if neg_g is None:
                  continue
  
              pos_g.ndata["id"] = pos_g.parent_nid
              neg_g.ndata["id"] = neg_g.parent_nid
              pos_g.edata["id"] = pos_g._parent.edata["tid"][
                  pos_g.parent_eid
              ]
              if has_edge_importance:
                  pos_g.edata["impts"] = pos_g._parent.edata["impts"][
                      pos_g.parent_eid
                  ]
              yield pos_g, neg_g
  
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 NewBidirectionalOneShotIterator obj's underlying member method code with example usage: obj.one_shot_iterator(dataloader, neg_chunk_size, neg_sample_size, is_chunked, neg_head, num_nodes, has_edge_importance) without return types