code: def test_ItemSetDict_iteration_node_pairs():
      # Node pairs.
      node_pairs = torch.arange(0, 10).reshape(-1, 2)
      node_pairs_dict = {
          "user:like:item": gb.ItemSet(node_pairs, names="node_pairs"),
          "user:follow:user": gb.ItemSet(
              node_pairs, names="node_pairs"
          ),
      }
      expected_data = []
      for key, value in node_pairs_dict.items():
          expected_data += [(key, v) for v in value]
      item_set = gb.ItemSetDict(node_pairs_dict)
      assert item_set.names == ("node_pairs",)
      # Iterating over ItemSetDict and indexing one by one.
      for i, item in enumerate(item_set):
          assert len(item) == 1
          assert isinstance(item, dict)
          assert expected_data[i][0] in item
          assert torch.equal(
              item[expected_data[i][0]], expected_data[i][1]
          )
          assert item_set[i].keys() == item.keys()
          key = list(item.keys())[0]
          assert torch.equal(item_set[i][key], item[key])
      # Indexing with a slice.
      assert torch.equal(item_set[:]["user:like:item"], node_pairs)
      assert torch.equal(item_set[:]["user:follow:user"], node_pairs)
  
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 13 for calling a global function with example usage: test_ItemSetDict_iteration_node_pairs() without return types