code: def peaks_to_labels(peaks, dist2peak, tau, inst_num):
      edges = peaks_to_edges(peaks, dist2peak, tau)
      pred_labels = edge_to_connected_graph(edges, inst_num)
      return pred_labels, 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 4 for calling a global function with example usage: peaks_to_labels(peaks, dist2peak, tau, inst_num) and returns: pred_labels,  edges