code: def cugraph_call(M, verts, directed=True):
      # cugraph can be compared to nx graph of same type.
      G = cugraph.Graph(directed=directed)
  
      cu_M = cudf.from_pandas(M)
  
      # FIXME: Add the column name in a list to trigger the python renumbering
      # Drop this requirement when 'subgraph_extraction' leverages the CAPI graph
      # which calls renumbering
      G.from_cudf_edgelist(
          cu_M, source="0", destination="1", edge_attr="weight"
      )
  
      cu_verts = cudf.Series(verts)
      return cugraph.subgraph(G, cu_verts)
  
file_path: cugraph/python/cugraph/cugraph/tests/community/test_subgraph_extraction.py
imports: import gc
  import numpy
  import pytest
  import networkx
  import cudf
  import cugraph
  from cugraph.testing import utils, DEFAULT_DATASETS
  from cugraph.datasets import karate
label_desc: Use image node_id 3 for calling a global function with example usage: cugraph_call(M, verts, directed) and returns: cugraph