class_docstr: A single DGN tower with modified reduce function
docstr: reduce function for DGN layer
docstr_tok: ["reduce","function","for","DGN","layer"]
code: def reduce_func(self, nodes):
      """reduce function for DGN layer"""
      h_in = nodes.data["h"]
      eig_s = nodes.mailbox["eig_s"]
      eig_d = nodes.mailbox["eig_d"]
      msg = nodes.mailbox["msg"]
      degree = msg.size(1)
  
      h = []
      for agg in self.aggregators:
          if agg.startswith("dir"):
              if agg.endswith("av"):
                  h.append(AGGREGATORS[agg](msg, eig_s, eig_d))
              else:
                  h.append(AGGREGATORS[agg](msg, eig_s, eig_d, h_in))
          else:
              h.append(AGGREGATORS[agg](msg))
      h = torch.cat(h, dim=1)
      h = torch.cat(
          [
              SCALERS[scaler](h, D=degree, delta=self.delta)
              if scaler != "identity"
              else h
              for scaler in self.scalers
          ],
          dim=1,
      )
      return {"h_neigh": h}
  
file_path: dgl/python/dgl/nn/pytorch/conv/dgnconv.py
imports: from functools import partial
  import torch
  import torch.nn
  from .pnaconv import AGGREGATORS, PNAConv, PNAConvTower, SCALERS
label_desc: Use image node_id 2 for calling the DGNConvTower obj's underlying member method code with example usage: obj.reduce_func(nodes) and returns: dict