class_docstr: Test the DiGraph structure we use to represent dependencies in PackageExporter
code: def test_all_paths(self):
      g = DiGraph()
      g.add_edge("1", "2")
      g.add_edge("1", "7")
      g.add_edge("7", "8")
      g.add_edge("8", "3")
      g.add_edge("2", "3")
      g.add_edge("5", "4")
      g.add_edge("4", "3")
  
      result = g.all_paths("1", "3")
      # to get rid of indeterminism
      actual = {i.strip("\n") for i in result.split(";")[2:-1]}
      expected = {
          '"2" -> "3"',
          '"1" -> "7"',
          '"7" -> "8"',
          '"1" -> "2"',
          '"8" -> "3"',
      }
      self.assertEqual(actual, expected)
  
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 12 for calling the TestDiGraph obj's underlying member method code with example usage: obj.test_all_paths() without return types