def _parallel_fit_estimator(estimator, X, y, sample_weight):
 if (sample_weight is not None):
  estimator.fit(X, y, sample_weight)
 else:
  estimator.fit(X, y)
 return estimator

def _parallel_fit_estimator ( estimator , X , y , sample_weight ) : if ( sample_weight is not None ) : estimator . fit ( X , y , sample_weight ) else : estimator . fit ( X , y ) return estimator
private function used to fit an estimator within a job .