code: def get_scorer(scoring):
      if isinstance(scoring, six.string_types):
          try:
              scorer = SCORERS[scoring]
          except KeyError:
              scorers = [
                  scorer
                  for scorer in SCORERS
                  if SCORERS[scorer]._deprecation_msg is None
              ]
              raise ValueError(
                  "%r is not a valid scoring value. "
                  "Valid options are %s" % (scoring, sorted(scorers))
              )
      else:
          scorer = scoring
      return scorer
  
imports: from abc import ABCMeta, abstractmethod
  import warnings
  import numpy
  from .None import r2_score, median_absolute_error, mean_absolute_error, mean_squared_error, accuracy_score, f1_score, roc_auc_score, average_precision_score, precision_score, recall_score, log_loss
  from .cluster import adjusted_rand_score
  from ..utils.multiclass import type_of_target
  from ..externals import six
  from ..base import is_regressor
label_desc: Use image node_id 1 for calling a global function with example usage: get_scorer(scoring) and returns: scorer