code: def _compute_shortest_path(
      graph, source_vids, dest_vids, weight_field=""
  ):
      """
      Computes shortest paths from any vertex in source_vids to any vertex
      in dest_vids.  Note that because SGraph is directed, shortest paths are
      also directed. To find undirected shortest paths add edges to the SGraph in
      both directions. Returns a list of shortest paths between source_vids
      and dest_vids.
  
      Note that this function does not compute all shortest paths between every
      (source, dest) pair. It computes
  
      Parameters
      ----------
      graph : SGraph
          The graph on which to compute shortest paths.
  
      source_vids : vertex ID or list of vertex IDs
          ID of the source vertices
  
      dest_vids : vertex ID or list of vertex IDs
          ID of the destination vertices
  
      weight_field : str, optional.
          The edge field representing the edge weights. If empty, uses unit
          weights.
  
      Returns
      -------
      out :  An SArray of lists of all the same length.
          Each list describes a path of vertices leading from one source
          vertex to one destination vertex.
  
      References
      ----------
      - `Wikipedia - ShortestPath <http://en.wikipedia.org/wiki/Shortest_path_problem>`_
  
      Examples
      --------
      If given an :class:`~turicreate.SGraph` ``g``, we can create
      a :class:`~turicreate.shortest_path.ShortestPathModel` as follows:
  
      >>> edge_src_ids = ['src1', 'src2',   'a', 'b', 'c'  ]
      >>> edge_dst_ids = [   'a',    'b', 'dst', 'c', 'dst']
      >>> edges = turicreate.SFrame({'__src_id': edge_src_ids, '__dst_id': edge_dst_ids})
      >>> g=tc.SGraph().add_edges(edges)
      >>> turicreate.shortest_path.compute_shortest_path(g, ["src1","src2"], "dst")
      [['a','dst']]
  
      See Also
      --------
      ShortestPathModel
      """
      if type(source_vids) != list:
          source_vids = [source_vids]
      if type(dest_vids) != list:
          dest_vids = [dest_vids]
      return _tc.extensions._toolkits.graph.sssp.all_shortest_paths(
          graph, source_vids, dest_vids, weight_field
      )
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
  from turicreate.data_structures.sgraph import SGraph
  from turicreate.toolkits.graph_analytics._model_base import GraphAnalyticsModel
  import copy
label_desc: Use image node_id 2 for calling a global function with example usage: _compute_shortest_path(graph, source_vids, dest_vids, weight_field) and returns: _tc