code: def _convert_graph_to_output_type(G, input_type):
      """
      Given a cugraph.Graph, convert it to a new type appropriate for the
      graph algos in this module, based on input_type.
      """
      if is_nx_graph_type(input_type):
          return cugraph_to_nx(G)
  
      else:
          return G
  
file_path: cugraph/python/cugraph/cugraph/community/egonet.py
imports: from cugraph.utilities import ensure_cugraph_obj, is_nx_graph_type
  from cugraph.utilities import cugraph_to_nx
  import cudf
  from pylibcugraph import ego_graph
  from pylibcugraph import ResourceHandle
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_graph_to_output_type(G, input_type) and returns: cugraph_to_nx, G