<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert_sklearn_metric_function(scoring):
 """If ``scoring`` is a sklearn metric function, convert it to a sklearn scorer and return it. Otherwise, return ``scoring`` unchanged."""

    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