code: def test_sssp_csr_graph(graph_file):
      df = graph_file.get_edgelist()
  
      M = cupyx.scipy.sparse.coo_matrix(
          (
              df["wgt"].to_cupy(),
              (df["src"].to_cupy(), df["dst"].to_cupy()),
          )
      )
      M = M.tocsr()
  
      offsets = cudf.Series(M.indptr)
      indices = cudf.Series(M.indices)
      weights = cudf.Series(M.data)
      G_csr = cugraph.Graph()
      G_coo = graph_file.get_graph()
  
      source = G_coo.select_random_vertices(num_vertices=1)[0]
  
      print("source = ", source)
  
      G_csr.from_cudf_adjlist(offsets, indices, weights)
  
      result_csr = cugraph.sssp(G_csr, source)
      result_coo = cugraph.sssp(G_coo, source)
  
      result_csr = result_csr.sort_values("vertex").reset_index(
          drop=True
      )
      result_sssp = (
          result_coo.sort_values("vertex")
          .reset_index(drop=True)
          .rename(
              columns={
                  "distance": "distance_coo",
                  "predecessor": "predecessor_coo",
              }
          )
      )
      result_sssp["distance_csr"] = result_csr["distance"]
      result_sssp["predecessor_csr"] = result_csr["predecessor"]
  
      distance_diffs = result_sssp.query("distance_csr != distance_coo")
      predecessor_diffs = result_sssp.query(
          "predecessor_csr != predecessor_coo"
      )
  
      assert len(distance_diffs) == 0
      assert len(predecessor_diffs) == 0
  
imports: import gc
  import pytest
  import numpy
  import pandas
  import cudf
  import cupyx
  import cugraph
  import cupy
  from cupyx.scipy.sparse import coo_matrix
  from cupyx.scipy.sparse import csr_matrix
  from cupyx.scipy.sparse import csc_matrix
  from scipy.sparse import coo_matrix
  from scipy.sparse import csr_matrix
  from scipy.sparse import csc_matrix
  from pylibcugraph.testing.utils import gen_fixture_params_product
  from cugraph.testing import utils, get_resultset, load_resultset, UNDIRECTED_DATASETS, SMALL_DATASETS
label_desc: Use image node_id 18 for calling a global function with example usage: test_sssp_csr_graph(graph_file) without return types