code: def compute_pagerank(g):
      g.ndata["pv"] = torch.ones(N) / N
      degrees = g.out_degrees(g.nodes()).type(torch.float32)
      for k in range(K):
          g.ndata["pv"] = g.ndata["pv"] / degrees
          g.update_all(
              message_func=fn.copy_u(u="pv", out="m"),
              reduce_func=fn.sum(msg="m", out="pv"),
          )
          g.ndata["pv"] = (1 - DAMP) / N + DAMP * g.ndata["pv"]
      return g.ndata["pv"]
  
imports: import dgl
  import dgl.function
  import networkx
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: compute_pagerank(g) and returns: g