code: def fit_transform(
      est,
      X,
      y,
      error_score="raise",
      fields=None,
      params=None,
      fit_params=None,
  ):
      if X is FIT_FAILURE:
          est, fit_time, Xt = FIT_FAILURE, 0.0, FIT_FAILURE
      else:
          if not fit_params:
              fit_params = {}
          start_time = default_timer()
          try:
              est = set_params(est, fields, params)
              if hasattr(est, "fit_transform"):
                  Xt = est.fit_transform(X, y, **fit_params)
              else:
                  est.fit(X, y, **fit_params)
                  Xt = est.transform(X)
          except Exception as e:
              if error_score == "raise":
                  raise
              warn_fit_failure(error_score, e)
              est = Xt = FIT_FAILURE
          fit_time = default_timer() - start_time
  
      return (est, fit_time), Xt
  
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 12 for calling a global function with example usage: fit_transform(est, X, y, error_score, fields, params, fit_params) and returns: est,  fit_time,  Xt