code: def _convert_to_cudf(
      cp_arrays: Tuple[cp.ndarray], col_names: list
  ) -> cudf.DataFrame:
      """
      Creates a cudf Dataframe from cupy arrays
      """
      src, dst, wgt, edge_id, edge_type_id, _ = cp_arrays
      gathered_edgelist_df = cudf.DataFrame()
      gathered_edgelist_df[col_names[0]] = src
      gathered_edgelist_df[col_names[1]] = dst
      if wgt is not None:
          gathered_edgelist_df[col_names[2]] = wgt
      if edge_id is not None:
          gathered_edgelist_df[col_names[3]] = edge_id
      if edge_type_id is not None:
          gathered_edgelist_df[col_names[4]] = edge_type_id
  
      return gathered_edgelist_df
  
file_path: cugraph/python/cugraph/cugraph/structure/replicate_edgelist.py
imports: import dask_cudf
  import cudf
  from dask.distributed import wait, default_client
  import numpy
  from pylibcugraph import ResourceHandle, replicate_edgelist
  from cugraph.dask.common.part_utils import get_persisted_df_worker_map, persist_dask_df_equal_parts_per_worker
  import dask
  import cupy
  import cugraph.dask.comms.comms
  from typing import Union, Tuple
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_to_cudf(cp_arrays, col_names) and returns: gathered_edgelist_df