code: def roc_auc_compute_fn(y_pred, y_target):
      """IGNITE.CONTRIB.METRICS.ROC_AUC"""
      try:
          from sklearn.metrics import roc_auc_score
      except ImportError:
          raise RuntimeError(
              "This contrib module requires sklearn to be installed."
          )
  
      if y_pred.requires_grad:
          y_pred = y_pred.detach()
  
      if y_target.is_cuda:
          y_target = y_target.cpu()
      if y_pred.is_cuda:
          y_pred = y_pred.cpu()
  
      y_true = y_target.numpy()
      y_pred = y_pred.numpy()
      try:
          return roc_auc_score(y_true, y_pred)
      except ValueError:
          # print('ValueError: Only one class present in y_true. ROC AUC score is not defined in that case.')
          return 0.0
  
imports: import math
  import os
  import random
  import sys
  import time
  import warnings
  import numpy
  import numpy
  import shutil
  import logging
  import torch
  import torchvision.transforms
  import torchvision.datasets
  import torch.nn
label_desc: Use image node_id 20 for calling a global function with example usage: roc_auc_compute_fn(y_pred, y_target) and returns: roc_auc_score, int