code: def peaks_to_edges(peaks, dist2peak, tau):
      edges = []
      for src in peaks:
          dsts = peaks[src]
          dists = dist2peak[src]
          for dst, dist in zip(dsts, dists):
              if src == dst or dist >= 1 - tau:
                  continue
              edges.append([src, dst])
      return edges
  
file_path: dgl/examples/pytorch/hilander/utils/deduce.py
imports: import dgl
  import numpy
  import torch
  from sklearn import mixture
  from .density import density_to_peaks, density_to_peaks_vectorize
label_desc: Use image node_id 3 for calling a global function with example usage: peaks_to_edges(peaks, dist2peak, tau) and returns: edges