code: def test_shortest_path(self):
      if "sssp" in get_unity().list_toolkit_functions():
          m = tc.shortest_path.create(self.graph, source_vid=0)
          print(m)
          m.summary()
          self.__test_model_save_load_helper__(m)
  
          m2 = tc.shortest_path.create(self.graph, source_vid=0)
          print(m2)
          self.__test_model_save_load_helper__(m2)
  
          # Test get_path function on a simple chain graph and star graph
          chain_graph = tc.SGraph().add_edges(
              [tc.Edge(i, i + 1) for i in range(10)]
          )
          m3 = tc.shortest_path.create(chain_graph, source_vid=0)
          for i in range(10):
              self.assertSequenceEqual(
                  m3.get_path(i), [(j, float(j)) for j in range(i + 1)]
              )
  
          star_graph = tc.SGraph().add_edges(
              [tc.Edge(0, i + 1) for i in range(10)]
          )
          m4 = tc.shortest_path.create(star_graph, source_vid=0)
          for i in range(1, 11):
              self.assertSequenceEqual(
                  m4.get_path(i), [(0, 0.0), (i, 1.0)]
              )
  
          # Test that get_path with the 'show' parameter set to True doesn't
          # break.
          #
          # Showing is problematic when there is actually a browser.
          # This will pause scripts.
          # m4.get_path(i, show=True)
  
          # Test sssp ignoring the existing distance field
          star_graph.vertices["distance"] = 0
          m5 = tc.shortest_path.create(star_graph, source_vid=0)
          for i in range(1, 11):
              self.assertSequenceEqual(
                  m5.get_path(i), [(0, 0.0), (i, 1.0)]
              )
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from .None import util
  import unittest
  import pandas
  from pandas.util.testing import assert_frame_equal
  import turicreate
  from turicreate._connect.main import get_unity
  from turicreate.toolkits._main import ToolkitError
  from turicreate.data_structures.sgraph import SGraph
  from turicreate.data_structures.sframe import SFrame
  import sys
label_desc: Use image node_id 10 for calling the GraphAnalyticsTest obj's underlying member method code with example usage: obj.test_shortest_path() without return types