code: def auc(ground_truth, prediction):
      try:
          res = roc_auc_score(y_true=ground_truth, y_score=prediction)
      except Exception:
          res = 0.0
      return res
  
file_path: dgl/examples/pytorch/NGCF/NGCF/utility/metrics.py
imports: import numpy
  from sklearn.metrics import roc_auc_score
label_desc: Use image node_id 10 for calling a global function with example usage: auc(ground_truth, prediction) and returns: res