code: def recv(
      dst,
      uniq_dst,
      bucketing_index,
      msg,
      reduce_function,
      num_nodes,
      num_edges,
  ):
      """Recv message from given msg to dst nodes."""
      if reduce_function == "sum":
          if isinstance(msg, dict):
              raise TypeError(
                  "The message for build-in function"
                  " should be Tensor not dict."
              )
  
          try:
              out_dim = msg.shape[-1]
              init_output = L.fill_constant(
                  shape=[num_nodes, out_dim], value=0, dtype=msg.dtype
              )
              init_output.stop_gradient = False
              empty_msg_flag = L.cast(num_edges > 0, dtype=msg.dtype)
              msg = msg * empty_msg_flag
              output = paddle_helper.scatter_add(init_output, dst, msg)
              return output
          except TypeError as e:
              warnings.warn(
                  "scatter_add is not supported with paddle version <= 1.5"
              )
  
              def sum_func(message):
                  return L.sequence_pool(message, "sum")
  
              reduce_function = sum_func
  
      bucketed_msg = op.nested_lod_reset(msg, bucketing_index)
      output = reduce_function(bucketed_msg)
      output_dim = output.shape[-1]
  
      empty_msg_flag = L.cast(num_edges > 0, dtype=output.dtype)
      output = output * empty_msg_flag
  
      init_output = L.fill_constant(
          shape=[num_nodes, output_dim], value=0, dtype=output.dtype
      )
      init_output.stop_gradient = True
      final_output = L.scatter(init_output, uniq_dst, output)
      return final_output
  
imports: import warnings
  import numpy
  import paddle.fluid
  import paddle.fluid.layers
  from pgl.utils import op
  from pgl.utils import paddle_helper
  from pgl.utils.logger import log
label_desc: Use image node_id 2 for calling a global function with example usage: recv(dst, uniq_dst, bucketing_index, msg, reduce_function, num_nodes, num_edges) and returns: final_output, output, L