code: def general_outcome_correlation(
      graph, y0, n_prop=50, alpha=0.8, use_norm=False, post_step=None
  ):
      with graph.local_scope():
          y = y0
          for _ in range(n_prop):
              if use_norm:
                  degs = graph.in_degrees().float().clamp(min=1)
                  norm = torch.pow(degs, -0.5)
                  shp = norm.shape + (1,) * (y.dim() - 1)
                  norm = torch.reshape(norm, shp)
                  y = y * norm
  
              graph.srcdata.update({"y": y})
              graph.update_all(fn.copy_u("y", "m"), fn.mean("m", "y"))
              y = graph.dstdata["y"]
  
              if use_norm:
                  degs = graph.in_degrees().float().clamp(min=1)
                  norm = torch.pow(degs, 0.5)
                  shp = norm.shape + (1,) * (y.dim() - 1)
                  norm = torch.reshape(norm, shp)
                  y = y * norm
  
              y = alpha * y + (1 - alpha) * y0
  
              if post_step is not None:
                  y = post_step(y)
  
          return y
  
file_path: dgl/examples/pytorch/ogb/ogbn-arxiv/correct_and_smooth.py
imports: import argparse
  import glob
  import numpy
  import torch
  import torch.nn.functional
  from dgl import function
  from ogb.nodeproppred import DglNodePropPredDataset, Evaluator
label_desc: Use image node_id 3 for calling a global function with example usage: general_outcome_correlation(graph, y0, n_prop, alpha, use_norm, post_step) and returns: y