code: def number_connected_components(G):
      G = _to_undirected_graph(G)
      return _number_connected_components(G)
  
file_path: cugraph/python/nx-cugraph/nx_cugraph/algorithms/components/connected.py
imports: import cupy
  import networkx
  import pylibcugraph
  from nx_cugraph.convert import _to_undirected_graph
  from nx_cugraph.utils import _groupby, networkx_algorithm, not_implemented_for
label_desc: Use image node_id 1 for calling a global function with example usage: number_connected_components(G) and returns: _number_connected_components