code: def bfs_edges(
      G, source, reverse=False, depth_limit=None, sort_neighbors=None
  ):
      """
      Find the distances and predecessors for a breadth first traversal of a
      graph.
  
      Parameters
      ----------
      G : cugraph.Graph, networkx.Graph, CuPy or SciPy sparse matrix
          Graph or matrix object, which should contain the connectivity
          information. Edge weights, if present, should be single or double
          precision floating point values.
  
      source : Integer
          The starting vertex index
  
      reverse : boolean, optional (default=False)
          If a directed graph, then process edges in a reverse direction
          Currently not implemented
  
      depth_limit : Int or None, optional (default=None)
          Limit the depth of the search
  
      sort_neighbors : None or Function, optional (default=None)
          Currently not implemented
  
      Returns
      -------
      Return value type is based on the input type.  If G is a cugraph.Graph,
      returns:
  
         cudf.DataFrame
            df['vertex'] vertex IDs
  
            df['distance'] path distance for each vertex from the starting vertex
  
            df['predecessor'] for each i'th position in the column, the vertex ID
            immediately preceding the vertex at position i in the 'vertex' column
  
      If G is a networkx.Graph, returns:
  
         pandas.DataFrame with contents equivalent to the cudf.DataFrame
         described above.
  
      If G is a CuPy or SciPy matrix, returns:
         a 2-tuple of CuPy ndarrays (if CuPy matrix input) or Numpy ndarrays (if
         SciPy matrix input) representing:
  
         distance: cupy or numpy ndarray
            ndarray of shortest distances between source and vertex.
  
         predecessor: cupy or numpy ndarray
            ndarray of predecessors of a vertex on the path from source, which
            can be used to reconstruct the shortest paths.
  
         ...or if return_sp_counter is True, returns a 3-tuple with the above two
         arrays plus:
  
         sp_counter: cupy or numpy ndarray
            ndarray of number of shortest paths leading to each vertex.
  
      Examples
      --------
      >>> from cugraph.datasets import karate
      >>> G = karate.get_graph(download=True)
      >>> df = cugraph.bfs_edges(G, 0)
  
      """
  
      if reverse is True:
          raise NotImplementedError(
              "reverse processing of graph is currently not supported"
          )
  
      return bfs(G, source, depth_limit)
  
file_path: cugraph/python/cugraph/cugraph/traversal/bfs.py
imports: import cudf
  import dask_cudf
  from pylibcugraph import ResourceHandle
  from pylibcugraph import bfs
  from cugraph.structure.graph_classes import Graph
  from cugraph.utilities import ensure_cugraph_obj, is_matrix_type, is_cp_matrix_type, is_nx_graph_type, cupy_package
label_desc: Use image node_id 4 for calling a global function with example usage: bfs_edges(G, source, reverse, depth_limit, sort_neighbors) and returns: bfs