code: def _resample_model(
      estimator_func,
      X,
      y,
      scaling=0.5,
      n_resampling=200,
      n_jobs=1,
      verbose=False,
      pre_dispatch="3*n_jobs",
      random_state=None,
      sample_fraction=0.75,
      **params,
  ):
      random_state = check_random_state(random_state)
      # We are generating 1 - weights, and not weights
      n_samples, n_features = X.shape
  
      if not (0 < scaling < 1):
          raise ValueError(
              "'scaling' should be between 0 and 1. Got %r instead."
              % scaling
          )
  
      scaling = 1.0 - scaling
      scores_ = 0.0
      for active_set in Parallel(
          n_jobs=n_jobs, verbose=verbose, pre_dispatch=pre_dispatch
      )(
          delayed(estimator_func)(
              X,
              y,
              weights=scaling
              * random_state.randint(0, 2, size=(n_features,)),
              mask=(random_state.rand(n_samples) < sample_fraction),
              verbose=max(0, verbose - 1),
              **params,
          )
          for _ in range(n_resampling)
      ):
          scores_ += active_set
  
      scores_ /= n_resampling
      return scores_
  
imports: import itertools
  from abc import ABCMeta, abstractmethod
  import warnings
  import numpy
  from scipy.sparse import issparse
  from scipy import sparse
  from scipy.interpolate import interp1d
  from .base import _preprocess_data
  from ..base import BaseEstimator, TransformerMixin
  from ..externals import six
  from ..externals.joblib import Memory, Parallel, delayed
  from ..utils import as_float_array, check_random_state, check_X_y, check_array, safe_mask
  from ..utils.validation import check_is_fitted
  from .least_angle import lars_path, LassoLarsIC
  from .logistic import LogisticRegression
  from ..exceptions import ConvergenceWarning
label_desc: Use image node_id 1 for calling a global function with example usage: _resample_model(estimator_func, X, y, scaling, n_resampling, n_jobs, verbose, pre_dispatch, random_state, sample_fraction) and returns: scores_