code: def get_scorer(scoring, compute=True):
      
      # This is the same as sklearns, only we use our SCORERS dict,
      # and don't have back-compat code
      if isinstance(scoring, six.string_types):
          try:
              scorer, kwargs = SCORERS[scoring]
          except KeyError:
              raise ValueError(
                  "{} is not a valid scoring value. "
                  "Valid options are {}".format(scoring, sorted(SCORERS))
              )
      else:
          scorer = scoring
          kwargs = {}
  
      kwargs["compute"] = compute
  
      return make_scorer(scorer, **kwargs)
docs: Get a scorer from string
  
      Parameters
      ----------
      scoring : str | callable
          scoring method as string. If callable it is returned as is.
  
      Returns
      -------
      scorer : callable
          The scorer.