code: def _roc_auc_score(y_true, y_score):
      """Compute Area Under the Receiver Operating Characteristic Curve (ROC AUC)
      from prediction scores.
  
      Note: this implementation is restricted to the binary classification task
  
      Parameters
      ----------
      y_true : array, shape = [n_samples] or [n_samples, n_classes]
          True binary labels or binary label indicators.
          The multiclass case expects shape = [n_samples] and labels
          with values in ``range(n_classes)``.
  
      y_score : array, shape = [n_samples] or [n_samples, n_classes]
          Target scores, can either be probability estimates of the positive
          class, confidence values, or non-thresholded measure of decisions
          (as returned by "decision_function" on some classifiers). For binary
          y_true, y_score is supposed to be the score of the class with greater
          label. The multiclass case expects shape = [n_samples, n_classes]
          where the scores correspond to probability estimates.
  
      Returns
      -------
      auc : float
  
      References
      ----------
      .. [1] `Wikipedia entry for the Receiver operating characteristic
              <https://en.wikipedia.org/wiki/Receiver_operating_characteristic>`_
  
      .. [2] Fawcett T. An introduction to ROC analysis[J]. Pattern Recognition
             Letters, 2006, 27(8):861-874.
  
      .. [3] `Analyzing a portion of the ROC curve. McClish, 1989
              <https://www.ncbi.nlm.nih.gov/pubmed/2668680>`_
      """
      if len(np.unique(y_true)) != 2:
          raise ValueError(Errors.E165.format(label=np.unique(y_true)))
      fpr, tpr, _ = _roc_curve(y_true, y_score)
      return _auc(fpr, tpr)
  
imports: from collections import defaultdict
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional, Set, Tuple
  import numpy
  from .errors import Errors
  from .morphology import Morphology
  from .tokens import Doc, Span, Token
  from .training import Example
  from .util import SimpleFrozenList, get_lang_class
label_desc: Use image node_id 3 for calling a global function with example usage: _roc_auc_score(y_true, y_score) and returns: _auc