docstr: Fit the model to data, separately for each output variable.
  
  Parameters
  ----------
  X : {array-like, sparse matrix} of shape (n_samples, n_features)
      The input data.
  
  y : {array-like, sparse matrix} of shape (n_samples, n_outputs)
      Multi-output targets. An indicator matrix turns on multilabel
      estimation.
  
  sample_weight : array-like of shape (n_samples,), default=None
      Sample weights. If `None`, then samples are equally weighted.
      Only supported if the underlying regressor supports sample
      weights.
  
  **fit_params : dict of string -> object
      Parameters passed to the ``estimator.fit`` method of each step.
  
      .. versionadded:: 0.23
  
  Returns
  -------
  self : object
      Returns a fitted instance.
code: def fit(self, X, y, sample_weight=None, **fit_params):
      """Fit the model to data, separately for each output variable.
  
      Parameters
      ----------
      X : {array-like, sparse matrix} of shape (n_samples, n_features)
          The input data.
  
      y : {array-like, sparse matrix} of shape (n_samples, n_outputs)
          Multi-output targets. An indicator matrix turns on multilabel
          estimation.
  
      sample_weight : array-like of shape (n_samples,), default=None
          Sample weights. If `None`, then samples are equally weighted.
          Only supported if the underlying regressor supports sample
          weights.
  
      **fit_params : dict of string -> object
          Parameters passed to the ``estimator.fit`` method of each step.
  
          .. versionadded:: 0.23
  
      Returns
      -------
      self : object
          Returns a fitted instance.
      """
      if not hasattr(self.estimator, "fit"):
          raise ValueError(
              "The base estimator should implement a fit method"
          )
  
      y = self._validate_data(X="no_validation", y=y, multi_output=True)
  
      if is_classifier(self):
          check_classification_targets(y)
  
      if y.ndim == 1:
          raise ValueError(
              "y must have at least two dimensions for "
              "multi-output regression but has only one."
          )
  
      if _routing_enabled():
          routed_params = process_routing(
              obj=self,
              method="fit",
              other_params=fit_params,
              sample_weight=sample_weight,
          )
      else:
          if sample_weight is not None and not has_fit_parameter(
              self.estimator, "sample_weight"
          ):
              raise ValueError(
                  "Underlying estimator does not support sample weights."
              )
  
          fit_params_validated = _check_fit_params(X, fit_params)
          routed_params = Bunch(
              estimator=Bunch(fit=fit_params_validated)
          )
          if sample_weight is not None:
              routed_params.estimator.fit[
                  "sample_weight"
              ] = sample_weight
  
      self.estimators_ = Parallel(n_jobs=self.n_jobs)(
          delayed(_fit_estimator)(
              self.estimator, X, y[:, i], **routed_params.estimator.fit
          )
          for i in range(y.shape[1])
      )
  
      if hasattr(self.estimators_[0], "n_features_in_"):
          self.n_features_in_ = self.estimators_[0].n_features_in_
      if hasattr(self.estimators_[0], "feature_names_in_"):
          self.feature_names_in_ = self.estimators_[0].feature_names_in_
  
      return self
  
imports: from abc import ABCMeta, abstractmethod
  from numbers import Integral
  import numpy
  import scipy.sparse
  from .base import BaseEstimator, ClassifierMixin, MetaEstimatorMixin, RegressorMixin, _fit_context, clone, is_classifier
  from .model_selection import cross_val_predict
  from .utils import Bunch, _print_elapsed_time, check_random_state
  from .utils._param_validation import HasMethods, StrOptions
  from .utils.metadata_routing import MetadataRouter, MethodMapping, _routing_enabled, process_routing
  from .utils.metaestimators import available_if
  from .utils.multiclass import check_classification_targets
  from .utils.parallel import Parallel, delayed
  from .utils.validation import _check_fit_params, check_is_fitted, has_fit_parameter
label_desc: Use image node_id 3 for calling the _MultiOutputEstimator obj's underlying member method code with example usage: obj.fit(X, y, sample_weight) and returns: self