code: def test_ItemSetDict_iteration_node_pairs_neg_dsts():
      # Node pairs and negative destinations.
      node_pairs = torch.arange(0, 10).reshape(-1, 2)
      neg_dsts = torch.arange(10, 25).reshape(-1, 3)
      node_pairs_neg_dsts = {
          "user:like:item": gb.ItemSet(
              (node_pairs, neg_dsts),
              names=("node_pairs", "negative_dsts"),
          ),
          "user:follow:user": gb.ItemSet(
              (node_pairs, neg_dsts),
              names=("node_pairs", "negative_dsts"),
          ),
      }
      expected_data = []
      for key, value in node_pairs_neg_dsts.items():
          expected_data += [(key, v) for v in value]
      item_set = gb.ItemSetDict(node_pairs_neg_dsts)
      assert item_set.names == ("node_pairs", "negative_dsts")
      # Iterating over ItemSetDict and indexing one by one.
      for i, item in enumerate(item_set):
          assert len(item) == 1
          assert isinstance(item, dict)
          key, value = expected_data[i]
          assert key in item
          assert torch.equal(item[key][0], value[0])
          assert torch.equal(item[key][1], value[1])
          assert item_set[i].keys() == item.keys()
          key = list(item.keys())[0]
          assert torch.equal(item_set[i][key][0], item[key][0])
          assert torch.equal(item_set[i][key][1], item[key][1])
      # Indexing with a slice.
      assert torch.equal(item_set[:]["user:like:item"][0], node_pairs)
      assert torch.equal(item_set[:]["user:like:item"][1], neg_dsts)
      assert torch.equal(item_set[:]["user:follow:user"][0], node_pairs)
      assert torch.equal(item_set[:]["user:follow:user"][1], neg_dsts)
  
imports: import re
  import dgl
  import pytest
  import torch
  from dgl import graphbolt
  from torch.testing import assert_close
label_desc: Use image node_id 15 for calling a global function with example usage: test_ItemSetDict_iteration_node_pairs_neg_dsts() without return types