class_docstr: Test the DiGraph structure we use to represent dependencies in PackageExporter
code: def test_iter(self):
      g = DiGraph()
      g.add_node(1)
      g.add_node(2)
      g.add_node(3)
  
      nodes = set()
      for n in g:
          nodes.add(n)
  
      self.assertEqual(nodes, {1, 2, 3})
  
file_path: pytorch/test/package/test_digraph.py
imports: from torch.package._digraph import DiGraph
  from torch.testing._internal.common_utils import run_tests
label_desc: Use image node_id 8 for calling the TestDiGraph obj's underlying member method code with example usage: obj.test_iter() without return types