code: def check_scoring(estimator, scoring=None, **kwargs):
      res = sklearn_check_scoring(estimator, scoring=scoring, **kwargs)
      if callable(scoring):
          # Heuristic to ensure user has not passed a metric
          module = getattr(scoring, "__module__", None)
          if (
              hasattr(module, "startswith")
              and module.startswith("dask_ml.metrics.")
              and not module.startswith("dask_ml.metrics.scorer")
              and not module.startswith("dask_ml.metrics.tests.")
          ):
              raise ValueError(
                  "scoring value %r looks like it is a metric "
                  "function rather than a scorer. A scorer should "
                  "require an estimator as its first parameter. "
                  "Please use `make_scorer` to convert a metric "
                  "to a scorer." % scoring
              )
      if scoring in SCORERS.keys():
          func, kwargs = SCORERS[scoring]
          return make_scorer(func, **kwargs)
      return res
  
imports: from typing import Any, Callable, Tuple, Union
  from sklearn.metrics import check_scoring, make_scorer
  from .None import accuracy_score, log_loss, mean_squared_error, r2_score
label_desc: Use image node_id 2 for calling a global function with example usage: check_scoring(estimator, scoring) and returns: res, make_scorer