code: def test_ItemSet_node_pairs():
      # Node pairs.
      node_pairs = torch.arange(0, 10).reshape(-1, 2)
      item_set = gb.ItemSet(node_pairs, names="node_pairs")
      assert item_set.names == ("node_pairs",)
      # Iterating over ItemSet and indexing one by one.
      for i, (src, dst) in enumerate(item_set):
          assert node_pairs[i][0] == src
          assert node_pairs[i][1] == dst
          assert node_pairs[i][0] == item_set[i][0]
          assert node_pairs[i][1] == item_set[i][1]
      # Indexing with a slice.
      assert torch.equal(item_set[:], node_pairs)
      # Indexing with an Iterable.
      assert torch.equal(item_set[torch.arange(0, 5)], 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 5 for calling a global function with example usage: test_ItemSet_node_pairs() without return types