code: def score(
      est_and_time,
      X_test,
      y_test,
      X_train,
      y_train,
      scorer,
      error_score,
  ):
      est, fit_time = est_and_time
      start_time = default_timer()
      try:
          test_score = _score(est, X_test, y_test, scorer)
      except Exception:
          if error_score == "raise":
              raise
          else:
              score_time = default_timer() - start_time
              return fit_time, error_score, score_time, error_score
      score_time = default_timer() - start_time
      if X_train is None:
          return fit_time, test_score, score_time
      train_score = _score(est, X_train, y_train, scorer)
      return fit_time, test_score, score_time, train_score
  
imports: from __future__ import absolute_import, division, print_function
  import warnings
  from collections import defaultdict
  from threading import Lock
  from timeit import default_timer
  import numpy
  import packaging.version
  from dask.base import normalize_token
  from scipy import sparse
  from scipy.stats import rankdata
  from sklearn.exceptions import FitFailedWarning
  from sklearn.pipeline import FeatureUnion, Pipeline
  from sklearn.utils.validation import check_consistent_length
  from toolz import pluck
  from .._compat import Mapping
  from .utils import _index_param_value, _num_samples, _safe_indexing, copy_estimator
label_desc: Use image node_id 14 for calling a global function with example usage: score(est_and_time, X_test, y_test, X_train, y_train, scorer, error_score) and returns: fit_time,  test_score,  score_time,  train_score, fit_time,  test_score,  score_time, fit_time,  error_score,  score_time,  error_score