code: def test_ItemSetDict_iteration_seed_nodes_labels():
      # Node IDs and labels.
      user_ids = torch.arange(0, 5)
      user_labels = torch.randint(0, 3, (5,))
      item_ids = torch.arange(5, 10)
      item_labels = torch.randint(0, 3, (5,))
      ids_labels = {
          "user": gb.ItemSet(
              (user_ids, user_labels), names=("seed_nodes", "labels")
          ),
          "item": gb.ItemSet(
              (item_ids, item_labels), names=("seed_nodes", "labels")
          ),
      }
      chained_ids = []
      for key, value in ids_labels.items():
          chained_ids += [(key, v) for v in value]
      item_set = gb.ItemSetDict(ids_labels)
      assert item_set.names == ("seed_nodes", "labels")
      # Iterating over ItemSetDict and indexing one by one.
      for i, item in enumerate(item_set):
          assert len(item) == 1
          assert isinstance(item, dict)
          assert chained_ids[i][0] in item
          assert item[chained_ids[i][0]] == chained_ids[i][1]
          assert item_set[i] == item
      # Indexing with a slice.
      assert torch.equal(item_set[:]["user"][0], user_ids)
      assert torch.equal(item_set[:]["user"][1], user_labels)
      assert torch.equal(item_set[:]["item"][0], item_ids)
      assert torch.equal(item_set[:]["item"][1], item_labels)
  
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 12 for calling a global function with example usage: test_ItemSetDict_iteration_seed_nodes_labels() without return types