code: def drnl_node_labeling(adj, src, dst):
      # Double Radius Node Labeling (DRNL).
      src, dst = (dst, src) if src > dst else (src, dst)
  
      idx = list(range(src)) + list(range(src + 1, adj.shape[0]))
      adj_wo_src = adj[idx, :][:, idx]
  
      idx = list(range(dst)) + list(range(dst + 1, adj.shape[0]))
      adj_wo_dst = adj[idx, :][:, idx]
  
      dist2src = shortest_path(
          adj_wo_dst, directed=False, unweighted=True, indices=src
      )
      dist2src = np.insert(dist2src, dst, 0, axis=0)
      dist2src = torch.from_numpy(dist2src)
  
      dist2dst = shortest_path(
          adj_wo_src, directed=False, unweighted=True, indices=dst - 1
      )
      dist2dst = np.insert(dist2dst, src, 0, axis=0)
      dist2dst = torch.from_numpy(dist2dst)
  
      dist = dist2src + dist2dst
      dist_over_2, dist_mod_2 = (
          torch.div(dist, 2, rounding_mode="floor"),
          dist % 2,
      )
  
      z = 1 + torch.min(dist2src, dist2dst)
      z += dist_over_2 * (dist_over_2 + dist_mod_2 - 1)
      z[src] = 1.0
      z[dst] = 1.0
      # shortest path may include inf values
      z[torch.isnan(z)] = 0.0
  
      return z.to(torch.long)
  
file_path: dgl/examples/pytorch/ogb/ngnn_seal/utils.py
imports: import random
  import sys
  import numpy
  import torch
  from dgl.sampling import global_uniform_negative_sampling
  from scipy.sparse.csgraph import shortest_path
label_desc: Use image node_id 2 for calling a global function with example usage: drnl_node_labeling(adj, src, dst) and returns: z