code: def roc_auc(y_pred: Tensor, y_true: Tensor, **kwargs):
      # ROC-AUC calcualation
      # Compute ROC curve and ROC area for each class
      fpr = dict()
      tpr = dict()
      roc_auc = dict()
  
      y_true = y_true.detach().cpu().numpy()
      y_pred = y_pred.detach().cpu().numpy()
  
      # Compute micro-average ROC curve and ROC area
      fpr["micro"], tpr["micro"], _ = roc_curve(
          y_true.ravel(), y_pred.ravel()
      )
      roc_auc["micro"] = auc(fpr["micro"], tpr["micro"])
  
      return roc_auc["micro"]
  
file_path: fast-bert/fast_bert/metrics.py
imports: import numpy
  from torch import Tensor
  from sklearn.metrics import roc_curve, auc, hamming_loss, accuracy_score, confusion_matrix
  import pdb
  import logging
label_desc: Use image node_id 5 for calling a global function with example usage: roc_auc(y_pred, y_true) and returns: roc_auc