code: def aggregate_dir_dx(h, eig_s, eig_d, h_in, eig_idx):
      """directional derivative aggregation"""
      eig_w = (
          (eig_s[:, :, eig_idx] - eig_d[:, :, eig_idx])
          / (
              torch.sum(
                  torch.abs(
                      eig_s[:, :, eig_idx] - eig_d[:, :, eig_idx]
                  ),
                  keepdim=True,
                  dim=1,
              )
              + 1e-30
          )
      ).unsqueeze(-1)
      h_mod = torch.mul(h, eig_w)
      return torch.abs(
          torch.sum(h_mod, dim=1) - torch.sum(eig_w, dim=1) * h_in
      )
  
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 a global function with example usage: aggregate_dir_dx(h, eig_s, eig_d, h_in, eig_idx) and returns: torch