code: def test_NegativeSampler_Hetero_Data():
      graph = get_hetero_graph()
      itemset = gb.ItemSetDict(
          {
              "n1:e1:n2": gb.ItemSet(
                  torch.LongTensor([[0, 0, 1, 1], [0, 2, 0, 1]]).T,
                  names="node_pairs",
              ),
              "n2:e2:n1": gb.ItemSet(
                  torch.LongTensor(
                      [[0, 0, 1, 1, 2, 2], [0, 1, 1, 0, 0, 1]]
                  ).T,
                  names="node_pairs",
              ),
          }
      )
  
      item_sampler = gb.ItemSampler(itemset, batch_size=2)
      negative_dp = gb.UniformNegativeSampler(item_sampler, graph, 1)
      assert len(list(negative_dp)) == 5
  
file_path: dgl/tests/python/pytorch/graphbolt/impl/test_negative_sampler.py
imports: import dgl.graphbolt
  import pytest
  import torch
  from ..None import gb_test_utils
label_desc: Use image node_id 5 for calling a global function with example usage: test_NegativeSampler_Hetero_Data() without return types