code: def test_get_traversed_cost(graph_file):
      cu_M = utils.read_csv_file(graph_file)
  
      noise = cudf.Series(np.random.randint(10, size=(cu_M.shape[0])))
      cu_M["info"] = cu_M["2"] + noise
  
      G = cugraph.Graph()
      G.from_cudf_edgelist(
          cu_M, source="0", destination="1", edge_attr="info"
      )
  
      # run SSSP starting at vertex 17
      df = cugraph.sssp(G, 16)
  
      answer = cugraph.utilities.path_retrieval.get_traversed_cost(
          df, 16, cu_M["0"], cu_M["1"], cu_M["info"]
      )
  
      df = df.sort_values(by="vertex").reset_index()
      answer = answer.sort_values(by="vertex").reset_index()
  
      assert df.shape[0] == answer.shape[0]
      assert np.allclose(df["distance"], answer["info"])
  
file_path: cugraph/python/cugraph/cugraph/tests/utils/test_utils.py
imports: import gc
  import pytest
  import numpy
  import cudf
  import cugraph
  from cugraph.testing import utils
  from cugraph.datasets import karate
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_traversed_cost(graph_file) without return types