code: def get_pairs(ppr_mat: scipy.sparse.csr_matrix) -> np.ndarray:
      ppr_mat = ppr_mat + ppr_mat.transpose()
  
      ppr_mat = ppr_mat.tocoo()
      row, col, data = ppr_mat.row, ppr_mat.col, ppr_mat.data
      mask = row > col  # lu
  
      row, col, data = row[mask], col[mask], data[mask]
      sort_arg = np.argsort(data)[::-1]
      # sort_arg = parallel_sort.parallel_argsort(data)[::-1]
  
      # map prime_nodes to arange
      ppr_pairs = np.vstack((row[sort_arg], col[sort_arg])).T
      return ppr_pairs
  
imports: import logging
  import math
  from typing import Callable, Iterator, List, NamedTuple, Optional, Tuple, Union
  import numpy
  import scipy.sparse
  import torch
  from torch import Tensor
  from tqdm import tqdm
  from torch_geometric.data import Data
  from torch_geometric.typing import SparseTensor
  from torch_geometric.utils import get_ppr, is_undirected, subgraph
label_desc: Use image node_id 7 for calling a global function with example usage: get_pairs(ppr_mat) and returns: ppr_pairs