parameters: (self, X, y, sample_weight=None)
return_statement: return self._fit(X, y, self.max_samples, sample_weight=sample_weight)
docstring: Build a Bagging ensemble of estimators from the training
             set (X, y).
  
          Parameters
          ----------
          X : {array-like, sparse matrix} of shape (n_samples, n_features)
              The training input samples. Sparse matrices are accepted only if
              they are supported by the base estimator.
  
          y : array-like of shape (n_samples,)
              The target values (class labels in classification, real numbers in
              regression).
  
          sample_weight : array-like of shape (n_samples,), default=None
              Sample weights. If None, then samples are equally weighted.
              Note that this is supported only if the base estimator supports
              sample weighting.
  
          Returns
          -------
          self : object
docstring_summary: Build a Bagging ensemble of estimators from the training
             set (X, y).
docstring_tokens: Build a Bagging ensemble of estimators from the training set ( X y ) .
function: def fit(self, X, y, sample_weight=None):
          """Build a Bagging ensemble of estimators from the training
             set (X, y).
  
          Parameters
          ----------
          X : {array-like, sparse matrix} of shape (n_samples, n_features)
              The training input samples. Sparse matrices are accepted only if
              they are supported by the base estimator.
  
          y : array-like of shape (n_samples,)
              The target values (class labels in classification, real numbers in
              regression).
  
          sample_weight : array-like of shape (n_samples,), default=None
              Sample weights. If None, then samples are equally weighted.
              Note that this is supported only if the base estimator supports
              sample weighting.
  
          Returns
          -------
          self : object
          """
          return self._fit(X, y, self.max_samples, sample_weight=sample_weight)
function_tokens: def fit ( self , X , y , sample_weight = None ) : return self . _fit ( X , y , self . max_samples , sample_weight = sample_weight )