code: def check_scorer(scorer):
      """Check that the scorer instance passed behaves as expected."""
      if not type(scorer).__name__ in [
          "_PredictScorer",
          "_ProbaScorer",
      ]:
          raise ValueError(
              "The passes scorer does not seem to be a valid scorer. Expected "
              "type '_PredictScorer', got '%s'. Use the "
              "mlens.metrics.make_scorer function to construct a valid scorer."
              % type(scorer).__name__
          )
  
file_path: mlens/mlens/model_selection/_base_functions.py
imports: from __future__ import division
  from collections import Counter
  from ..parallel import EvalLearner, EvalTransformer, Pipeline
  from ..utils.formatting import _assert_format
  from ..utils.checks import assert_valid_estimator
  from ..externals.sklearn.base import clone
label_desc: Use image node_id 2 for calling a global function with example usage: check_scorer(scorer) without return types