code: def _fix_auc(scoring, y):
      from sklearn.preprocessing import LabelEncoder
  
      # This fixes sklearn's inability to compute roc_auc when y not in [0, 1]
      # scikit-learn/scikit-learn#6874
      if scoring is not None:
          score_func = getattr(scoring, "_score_func", None)
          kwargs = getattr(scoring, "_kwargs", {})
          if (
              getattr(score_func, "__name__", "") == "roc_auc_score"
              and kwargs.get("multi_class", "raise") == "raise"
          ):
              if np.ndim(y) != 1 or len(set(y)) != 2:
                  raise ValueError(
                      "roc_auc scoring can only be computed for "
                      "two-class problems."
                  )
              y = LabelEncoder().fit_transform(y)
      return y
  
imports: import logging
  import numpy
  from ..fixes import _get_check_scoring
  from ..parallel import parallel_func
  from ..utils import ProgressBar, _parse_verbose, array_split_idx, fill_doc, verbose
  from .base import BaseEstimator, _check_estimator
  from .mixin import TransformerMixin
label_desc: Use image node_id 9 for calling a global function with example usage: _fix_auc(scoring, y) and returns: y