code: def _agg_func(inputs, dsttype, fn):  # pylint: disable=unused-argument
      if len(inputs) == 0:
          return None
      stacked = th.stack(inputs, dim=0)
      return fn(stacked, dim=0)
  
imports: from functools import partial
  import torch
  import torch.nn
  from ...base import DGLError
label_desc: Use image node_id 6 for calling a global function with example usage: _agg_func(inputs, dsttype, fn) and returns: fn, None