code: def set_params(est, fields=None, params=None, copy=True):
      if copy:
          est = copy_estimator(est)
      if fields is None:
          return est
      params = {
          f: p for (f, p) in zip(fields, params) if p is not MISSING
      }
      # TODO: rewrite set_params to avoid lock for classes that use the standard
      # set_params/get_params methods
      with SET_PARAMS_LOCK:
          return est.set_params(**params)
  
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 10 for calling a global function with example usage: set_params(est, fields, params, copy) and returns: est, est