code: def _get_lb2idxs(labels):
      lb2idxs = {}
      for idx, lb in enumerate(labels):
          if lb not in lb2idxs:
              lb2idxs[lb] = []
          lb2idxs[lb].append(idx)
      return lb2idxs
  
file_path: dgl/examples/pytorch/hilander/utils/metrics.py
imports: from __future__ import division
  import numpy
  from sklearn.metrics import precision_score, recall_score
  from sklearn.metrics.cluster import contingency_matrix, normalized_mutual_info_score
label_desc: Use image node_id 2 for calling a global function with example usage: _get_lb2idxs(labels) and returns: lb2idxs