code: def score_predictions(y, p, scorer, name, inst_name):
      """Try-Except wrapper around Learner scoring"""
      s = None
      if scorer is not None:
          try:
              s = scorer(y, p)
          except Exception as exc:
              warnings.warn(
                  "[%s] Could not score %s. Details:\n%r"
                  % (name, inst_name, exc),
                  MetricWarning,
              )
      return s
  
file_path: mlens/mlens/parallel/_base_functions.py
imports: from __future__ import division
  import os
  import warnings
  from scipy.sparse import issparse
  import numpy
  from ..utils import pickle_load, pickle_save, load
  from ..utils.exceptions import MetricWarning, ParameterChangeWarning
label_desc: Use image node_id 10 for calling a global function with example usage: score_predictions(y, p, scorer, name, inst_name) and returns: s