code: def reduce_func(nodes):
      msgs = nodes.mailbox["m"]
      reduce_msg_shapes.add(tuple(msgs.shape))
      assert F.ndim(msgs) == 3
      assert F.shape(msgs)[2] == D
      return {"accum": F.sum(msgs, 1)}
  
imports: import warnings
  from collections import defaultdict
  import backend
  import dgl
  import networkx
  import numpy
  from utils import parametrize_idtype
label_desc: Use image node_id 2 for calling a global function with example usage: reduce_func(nodes) and returns: dict