code: def sample_from_item_pairs(self, heads, tails, neg_tails):
      # Create a graph with positive connections only and another graph with negative
      # connections only.
      pos_graph = dgl.graph(
          (heads, tails), num_nodes=self.g.num_nodes(self.item_type)
      )
      neg_graph = dgl.graph(
          (heads, neg_tails), num_nodes=self.g.num_nodes(self.item_type)
      )
      pos_graph, neg_graph = dgl.compact_graphs([pos_graph, neg_graph])
      seeds = pos_graph.ndata[dgl.NID]
  
      blocks = self.sample_blocks(seeds, heads, tails, neg_tails)
      return pos_graph, neg_graph, blocks
  
imports: import dgl
  import numpy
  import torch
  from torch.utils.data import DataLoader, IterableDataset
  from torchtext.data.functional import numericalize_tokens_from_iterator
label_desc: Use image node_id 3 for calling the NeighborSampler obj's underlying member method code with example usage: obj.sample_from_item_pairs(heads, tails, neg_tails) and returns: pos_graph,  neg_graph,  blocks