code: def preprocess(g, features, args):
      """
      Pre-compute the average of n-th hop neighbors
      """
      with torch.no_grad():
          g.edata["weight"] = calc_weight(g)
          g.ndata["feat_0"] = features
          for hop in range(1, args.R + 1):
              g.update_all(
                  fn.u_mul_e(f"feat_{hop-1}", "weight", "msg"),
                  fn.sum("msg", f"feat_{hop}"),
              )
          res = []
          for hop in range(args.R + 1):
              res.append(g.ndata.pop(f"feat_{hop}"))
          return res
  
imports: import argparse
  import os
  import time
  import dgl
  import dgl.function
  import torch
  import torch.nn
  import torch.nn.functional
  from dataset import load_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: preprocess(g, features, args) and returns: res