code: def test_subgraph_extraction_Graph_nx(graph_file):
      directed = False
      verts = np.zeros(3, dtype=np.int32)
      verts[0] = 0
      verts[1] = 1
      verts[2] = 17
      dataset_path = graph_file.get_path()
      M = utils.read_csv_for_nx(dataset_path)
  
      if directed:
          G = nx.from_pandas_edgelist(
              M,
              source="0",
              target="1",
              edge_attr="weight",
              create_using=nx.DiGraph(),
          )
      else:
          G = nx.from_pandas_edgelist(
              M,
              source="0",
              target="1",
              edge_attr="weight",
              create_using=nx.Graph(),
          )
  
      nx_sub = nx.subgraph(G, verts)
  
      cu_verts = cudf.Series(verts)
      cu_sub = cugraph.subgraph(G, cu_verts)
  
      for u, v in cu_sub.edges():
          assert nx_sub.has_edge(u, v)
  
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 7 for calling a global function with example usage: test_subgraph_extraction_Graph_nx(graph_file) without return types