code: def _binary_roc_auc_score(y_true, y_score):
      """Compute binary roc_auc_score using cupy"""
  
      if cp.unique(y_true).shape[0] == 1:
          raise ValueError(
              "roc_auc_score cannot be used when "
              "only one class present in y_true. ROC AUC score "
              "is not defined in that case."
          )
  
      if cp.unique(y_score).shape[0] == 1:
          return 0.5
  
      fps, tps, thresholds = _binary_clf_curve(y_true, y_score)
      tpr = tps / tps[-1]
      fpr = fps / fps[-1]
  
      return _calculate_area_under_curve(fpr, tpr).item()
  
file_path: cuml/python/cuml/metrics/_ranking.py
imports: import math
  from cuml.internals.input_utils import input_to_cupy_array
  from cuml.internals.array import CumlArray
  import cuml.internals
  from cuml.internals.safe_imports import cpu_only_import
  import typing
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 4 for calling a global function with example usage: _binary_roc_auc_score(y_true, y_score) and returns: _calculate_area_under_curve, int