docstr: Returns negative samples.
  
  Parameters
  ----------
  g : DGLGraph
      The graph.
  eids : Tensor or dict[etype, Tensor]
      The sampled edges in the minibatch.
  
  Returns
  -------
  tuple[Tensor, Tensor] or dict[etype, tuple[Tensor, Tensor]]
      The returned source-destination pairs as negative samples.
docstr_tok: ["Returns","negative","samples",".","Parameters","--","--","--","--","--","g",":","DGLGraph","The","graph",".","eids",":","Tensor","or","dict","[","etype",",","Tensor","]","The","sampled","edges","in","the","minibatch",".","Returns","--","--","--","-","tuple","[","Tensor",",","Tensor","]","or","dict","[","etype",",","tuple","[","Tensor",",","Tensor","]","]","The","returned","source-destination","pairs","as","negative","samples","."]
code: def __call__(self, g, eids):
      """Returns negative samples.
  
      Parameters
      ----------
      g : DGLGraph
          The graph.
      eids : Tensor or dict[etype, Tensor]
          The sampled edges in the minibatch.
  
      Returns
      -------
      tuple[Tensor, Tensor] or dict[etype, tuple[Tensor, Tensor]]
          The returned source-destination pairs as negative samples.
      """
      if isinstance(eids, Mapping):
          eids = {g.to_canonical_etype(k): v for k, v in eids.items()}
          neg_pair = {
              k: self._generate(g, v, k) for k, v in eids.items()
          }
      else:
          assert (
              len(g.canonical_etypes) == 1
          ), "please specify a dict of etypes and ids for graphs with multiple edge types"
          neg_pair = self._generate(g, eids, g.canonical_etypes[0])
  
      return neg_pair
  
file_path: dgl/python/dgl/dataloading/negative_sampler.py
imports: from collections.abc import Mapping
  from ..None import backend
label_desc: Use image node_id 2 for calling the _BaseNegativeSampler obj's underlying member method code with example usage: obj.__call__(g, eids) and returns: neg_pair