code: def aggr(batch, y, nxt_y, y0, alpha):
      pred = graph.predecessor(batch.numpy())
      self_label = paddle.to_tensor(y[batch.numpy()])
      self_label0 = paddle.to_tensor(y0[batch.numpy()])
      pred_id = []
      for n, p in enumerate(pred):
          if len(p) > 0:
              pred_id.append(np.ones(len(p)) * n)
      pred_cat = np.concatenate(pred)
      pred_id_cat = paddle.to_tensor(
          np.concatenate(pred_id), dtype="int64"
      )
      pred_cat_pd = paddle.to_tensor(pred_cat)
  
      pred_label = paddle.to_tensor(y[pred_cat])
  
      pred_norm = paddle.gather(indegree, pred_cat_pd)
      self_norm = paddle.gather(
          indegree, paddle.to_tensor(batch, dtype="int64")
      )
  
      others = paddle.zeros_like(self_label)
      others = paddle.scatter(others, pred_id_cat, pred_label)
      others = (1 - alpha) * (
          others + self_label
      ) * self_norm + alpha * self_label0
      others = others / paddle.sum(others, -1, keepdim=True)
      nxt_y[batch] = others.numpy()
  
file_path: PGL/examples/kddcup2021/MAG240M/r_unimp/post_smoothing.py
imports: import paddle
  from tqdm import tqdm
  import pgl
  import numpy
  import torch
  from ogb.lsc import MAG240MDataset, MAG240MEvaluator
  import time
  import sys
  import os
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: aggr(batch, y, nxt_y, y0, alpha) without return types