code: def convert_sklearn_metric_function(scoring):
      
      if callable(scoring):
          module = getattr(scoring, '__module__', None)
          if (
                  hasattr(module, 'startswith') and
                  module.startswith('sklearn.metrics.') and
                  not module.startswith('sklearn.metrics.scorer') and
                  not module.startswith('sklearn.metrics.tests.')
          ):
              return make_scorer(scoring)
      return scoring
docs: If ``scoring`` is a sklearn metric function, convert it to a
      sklearn scorer and return it. Otherwise, return ``scoring`` unchanged.