old_contents: """ Example of finding paths and printing type details. """
  
  from tulip import *
  from tulipgui import *
  import tulippaths as tp
  
  # Load the graph.
  graph = tlp.loadGraph("../data/test_one.tlp")
  
  # Find start and end nodes
  source = tp.getNodeById(176, graph)
  target = tp.getNodeById(606, graph)
  
  # Find paths
  finder = tp.PathFinder(graph)
  finder.findPaths(source, target, 3)
  
  # Print paths
  print 'The failed paths are:'
  for path in finder.valid:
      print '  ' + path.toString()
  
  print 'The valid paths are:'
  for path in finder.valid:
      print '  ' + path.toString()
  
  print 'The valid paths types are:'
  for path in finder.valid:
      print '  ' + path.toStringOfTypes()
  
  # Render the graph in a node-link diagram.
  nodeLinkView = tlpgui.createNodeLinkDiagramView(graph)
new_contents: """ Example of finding paths and unique types using PathStats """
  
  from tulip import *
  from tulipgui import *
  import tulippaths as tp
  
  # Path parameters
  graphFile = '../data/514_4hops.tlp'
  sourceNodeId = 593
  targetNodeId = 514
  maxNumHops = 5
  
  graph = tlp.loadGraph(graphFile)
  
  # Find start and end nodes
  source = tp.getNodeById(sourceNodeId, graph)
  target = tp.getNodeById(targetNodeId, graph)
  
  finder = tp.PathFinder(graph)
  print 'hops, total, valid, unique, num w\ loop'
  for i in range(0, maxNumHops):
      finder.reset()
      finder.findPaths(source, target, i)
      stats = tp.PathStats(finder.valid)
  
      print str(i) + ', ' + str(len(finder.valid) + len(finder.failed)) + ', ' + str(len(finder.valid)) + ', ' + \
            str(stats.getNumUniqueTypes()) + ', ' + str(stats.getNumPathsWithLoop())
  
  # Render the graph in a node-link diagram.
  nodeLinkView = tlpgui.createNodeLinkDiagramView(graph)
subject: Add PathStats to intermediatePathTypes demo.