code: def prop_edges_dfs(
      graph,
      source,
      message_func,
      reduce_func,
      reverse=False,
      has_reverse_edge=False,
      has_nontree_edge=False,
      apply_node_func=None,
  ):
      """Message propagation using edge frontiers generated by labeled DFS.
  
      Parameters
      ----------
      graph : DGLGraph
          The graph object.
      source : list, tensor of nodes
          Source nodes.
      message_func : callable, optional
          The message function.
      reduce_func : callable, optional
          The reduce function.
      reverse : bool, optional
          If true, traverse following the in-edge direction.
      has_reverse_edge : bool, optional
          If true, REVERSE edges are included.
      has_nontree_edge : bool, optional
          If true, NONTREE edges are included.
      apply_node_func : callable, optional
          The update function.
  
      See Also
      --------
      dgl.traversal.dfs_labeled_edges_generator
      """
      assert isinstance(
          graph, DGLGraph
      ), "DGLHeteroGraph is merged with DGLGraph, Please use DGLGraph"
      assert (
          len(graph.canonical_etypes) == 1
      ), "prop_edges_dfs only support homogeneous graph"
      # TODO(murphy): Graph traversal currently is only supported on
      # CPP graphs. Move graph to CPU as a workaround,
      # which should be fixed in the future.
      edges_gen = trv.dfs_labeled_edges_generator(
          graph.cpu(),
          source,
          reverse,
          has_reverse_edge,
          has_nontree_edge,
          return_labels=False,
      )
      edges_gen = [
          F.copy_to(frontier, graph.device) for frontier in edges_gen
      ]
      prop_edges(
          graph, edges_gen, message_func, reduce_func, apply_node_func
      )
  
file_path: dgl/python/dgl/propagate.py
imports: from __future__ import absolute_import
  from .None import backend, traversal
  from .heterograph import DGLGraph
label_desc: Use image node_id 5 for calling a global function with example usage: prop_edges_dfs(graph, source, message_func, reduce_func, reverse, has_reverse_edge, has_nontree_edge, apply_node_func) without return types