code: def _convert_df_series_to_output_type(df, offsets, input_type):
      """
      Given a cudf.DataFrame df, 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 df.to_pandas(), offsets.values_host.tolist()
  
      else:
          return df, offsets
  
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 2 for calling a global function with example usage: _convert_df_series_to_output_type(df, offsets, input_type) and returns: df,  offsets, df,  offsets