code: def test_scipy_api_compat():
      graph_file = SMALL_DATASETS[0]
      dataset_path = graph_file.get_path()
      input_cugraph_graph = graph_file.get_graph()
      input_coo_matrix = utils.create_obj_from_csv(
          dataset_path, cp_coo_matrix, edgevals=True
      )
  
      # Ensure scipy-only options are rejected for cugraph inputs
      with pytest.raises(TypeError):
          cugraph.shortest_path(
              input_cugraph_graph, source=0, directed=False
          )
      with pytest.raises(TypeError):
          cugraph.shortest_path(
              input_cugraph_graph, source=0, unweighted=False
          )
      with pytest.raises(TypeError):
          cugraph.shortest_path(
              input_cugraph_graph, source=0, overwrite=False
          )
      with pytest.raises(TypeError):
          cugraph.shortest_path(
              input_cugraph_graph, source=0, return_predecessors=False
          )
  
      # Ensure cugraph-compatible options work as expected
      # cannot set both source and indices, but must set one
      with pytest.raises(TypeError):
          cugraph.shortest_path(
              input_cugraph_graph, source=0, indices=0
          )
      with pytest.raises(TypeError):
          cugraph.shortest_path(input_cugraph_graph)
      with pytest.raises(ValueError):
          cugraph.shortest_path(
              input_cugraph_graph, source=0, method="BF"
          )
      cugraph.shortest_path(input_cugraph_graph, indices=0)
      with pytest.raises(ValueError):
          cugraph.shortest_path(input_cugraph_graph, indices=[0, 1, 2])
      cugraph.shortest_path(
          input_cugraph_graph, source=0, method="auto"
      )
  
      # Ensure SciPy options for matrix inputs work as expected
      # cannot set both source and indices, but must set one
      with pytest.raises(TypeError):
          cugraph.shortest_path(input_coo_matrix, source=0, indices=0)
      with pytest.raises(TypeError):
          cugraph.shortest_path(input_coo_matrix)
      with pytest.raises(ValueError):
          cugraph.shortest_path(input_coo_matrix, source=0, method="BF")
      cugraph.shortest_path(input_coo_matrix, source=0, method="auto")
  
      with pytest.raises(ValueError):
          cugraph.shortest_path(input_coo_matrix, source=0, directed=3)
      cugraph.shortest_path(input_coo_matrix, source=0, directed=True)
      cugraph.shortest_path(input_coo_matrix, source=0, directed=False)
  
      with pytest.raises(ValueError):
          cugraph.shortest_path(
              input_coo_matrix, source=0, return_predecessors=3
          )
      (distances, preds) = cugraph.shortest_path(
          input_coo_matrix, source=0, return_predecessors=True
      )
      distances = cugraph.shortest_path(
          input_coo_matrix, source=0, return_predecessors=False
      )
      assert type(distances) != tuple
  
      with pytest.raises(ValueError):
          cugraph.shortest_path(
              input_coo_matrix, source=0, unweighted=False
          )
      cugraph.shortest_path(input_coo_matrix, source=0, unweighted=True)
  
      with pytest.raises(ValueError):
          cugraph.shortest_path(
              input_coo_matrix, source=0, overwrite=True
          )
      cugraph.shortest_path(input_coo_matrix, source=0, overwrite=False)
  
      with pytest.raises(ValueError):
          cugraph.shortest_path(input_coo_matrix, indices=[0, 1, 2])
      cugraph.shortest_path(input_coo_matrix, indices=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 17 for calling a global function with example usage: test_scipy_api_compat() without return types