code: def test_sssp_nonnative_inputs_graph(
      single_dataset_source_goldenresults, directed
  ):
      (
          _,
          _,
          graph_file,
          source,
          golden_paths,
      ) = single_dataset_source_goldenresults
      dataset_name = graph_file.metadata["name"]
      result = get_resultset(
          resultset_name="traversal",
          algo="sssp_nonnative",
          graph_dataset=dataset_name,
          graph_directed=str(directed),
          source=str(source),
      )
      if np.issubdtype(result["distance"].dtype, np.integer):
          max_val = np.iinfo(result["distance"].dtype).max
      else:
          max_val = np.finfo(result["distance"].dtype).max
      verts = result["vertex"].to_numpy()
      dists = result["distance"].to_numpy()
      preds = result["predecessor"].to_numpy()
      cu_paths = dict(zip(verts, zip(dists, preds)))
  
      # Calculating mismatch
      err = 0
      for vid in cu_paths:
          # Validate vertices that are reachable
          # NOTE : If distance type is float64 then cu_paths[vid][0]
          # should be compared against np.finfo(np.float64).max)
          if cu_paths[vid][0] != max_val:
              if cu_paths[vid][0] != golden_paths[vid]:
                  err = err + 1
              # check pred dist + 1 = current dist (since unweighted)
              pred = cu_paths[vid][1]
              if (
                  vid != source
                  and cu_paths[pred][0] + 1 != cu_paths[vid][0]
              ):
                  err = err + 1
          else:
              if vid in golden_paths.keys():
                  err = err + 1
  
      assert err == 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 12 for calling a global function with example usage: test_sssp_nonnative_inputs_graph(single_dataset_source_goldenresults, directed) without return types