code: def test_non_CAI_input_scc(api_name):
      """
      Ensures that the *_connected_components() APIs only accepts instances of
      objects that have a __cuda_array_interface__
      """
      import pylibcugraph
  
      cupy_array = cp.ndarray(range(8))
      python_list = list(range(8))
      api = getattr(pylibcugraph, api_name)
  
      with pytest.raises(TypeError):
          api(
              src=cupy_array,
              dst=cupy_array,
              weights=cupy_array,  # should raise, weights must be None
              num_verts=2,
              num_edges=8,
              labels=cupy_array,
          )
      with pytest.raises(TypeError):
          api(
              src=cupy_array,
              dst=python_list,  # should raise, no __cuda_array_interface__
              weights=None,
              num_verts=2,
              num_edges=8,
              labels=cupy_array,
          )
      with pytest.raises(TypeError):
          api(
              src=python_list,  # should raise, no __cuda_array_interface__
              dst=cupy_array,
              weights=None,
              num_verts=2,
              num_edges=8,
              labels=cupy_array,
          )
      with pytest.raises(TypeError):
          api(
              src=cupy_array,
              dst=cupy_array,
              weights=None,
              num_verts=2,
              num_edges=8,
              labels=python_list,
          )
  
file_path: cugraph/python/pylibcugraph/pylibcugraph/tests/test_connected_components.py
imports: from pathlib import Path
  import pytest
  import numpy
  import pandas
  import cupy
  from scipy.sparse import coo_matrix, csr_matrix
  from pylibcugraph import ResourceHandle, GraphProperties, SGGraph
  from pylibcugraph.testing import utils
label_desc: Use image node_id 6 for calling a global function with example usage: test_non_CAI_input_scc(api_name) without return types