code: def test_shortest_path_length_no_target(
      graphs, load_traversal_results
  ):
      cugraph_G, cupy_df = graphs
  
      cugraph_path_1_to_all = cugraph.shortest_path_length(cugraph_G, 1)
      golden_path_1_to_all = get_resultset(
          resultset_name="traversal",
          algo="shortest_path_length",
          graph_dataset="DISCONNECTED",
          graph_directed=str(True),
          source="1",
          weight="weight",
      )
      cupy_path_1_to_all = cugraph.shortest_path_length(cupy_df, 1)
  
      # Cast networkx graph on cugraph vertex column type from str to int.
      # SSSP preserves vertex type, convert for comparison
      assert cugraph_path_1_to_all == cupy_path_1_to_all
  
      # results for vertex 8 and 9 are not returned
      assert (
          cugraph_path_1_to_all.shape[0]
          == len(golden_path_1_to_all) + 2
      )
      for index in range(cugraph_path_1_to_all.shape[0]):
          vertex = cugraph_path_1_to_all["vertex"][index].item()
          distance = cugraph_path_1_to_all["distance"][index].item()
  
          # verify cugraph against networkx
          if vertex in {8, 9}:
              # Networkx does not return distances for these vertexes.
              assert distance == sys.float_info.max
          else:
              assert (
                  distance
                  == golden_path_1_to_all.loc[
                      golden_path_1_to_all.vertex == vertex
                  ].distance.iloc[0]
              )
  
file_path: cugraph/python/cugraph/cugraph/tests/traversal/test_paths.py
imports: import sys
  from tempfile import NamedTemporaryFile
  import math
  import numpy
  import pytest
  import cudf
  import cupy
  import cugraph
  from cugraph.testing import get_resultset, load_resultset
  from cupyx.scipy.sparse import coo_matrix
label_desc: Use image node_id 8 for calling a global function with example usage: test_shortest_path_length_no_target(graphs, load_traversal_results) without return types