code: def _onedal_fit_ready(self, patching_status, X, y, sample_weight):
      if sp.issparse(y):
          raise ValueError(
              "sparse multilabel-indicator for y is not supported."
          )
  
      if sklearn_check_version("1.2"):
          self._validate_params()
      else:
          self._check_parameters()
  
      if not self.bootstrap and self.oob_score:
          raise ValueError(
              "Out of bag estimation only available"
              " if bootstrap=True"
          )
  
      patching_status.and_conditions(
          [
              (
                  self.oob_score
                  and daal_check_version((2021, "P", 500))
                  or not self.oob_score,
                  "OOB score is only supported starting from 2021.5 version of oneDAL.",
              ),
              (
                  self.warm_start is False,
                  "Warm start is not supported.",
              ),
              (
                  self.criterion == "gini",
                  f"'{self.criterion}' criterion is not supported. "
                  "Only 'gini' criterion is supported.",
              ),
              (
                  self.ccp_alpha == 0.0,
                  f"Non-zero 'ccp_alpha' ({self.ccp_alpha}) is not supported.",
              ),
              (
                  not sp.issparse(X),
                  "X is sparse. Sparse input is not supported.",
              ),
              (
                  self.n_estimators <= 6024,
                  "More than 6024 estimators is not supported.",
              ),
          ]
      )
  
      if self.bootstrap:
          patching_status.and_conditions(
              [
                  (
                      self.class_weight != "balanced_subsample",
                      "'balanced_subsample' for class_weight is not supported",
                  )
              ]
          )
  
      if patching_status.get_status() and sklearn_check_version("1.4"):
          try:
              _assert_all_finite(X)
              input_is_finite = True
          except ValueError:
              input_is_finite = False
          patching_status.and_conditions(
              [
                  (
                      input_is_finite,
                      "Non-finite input is not supported.",
                  ),
                  (
                      self.monotonic_cst is None,
                      "Monotonicity constraints are not supported.",
                  ),
              ]
          )
  
      if patching_status.get_status():
          if sklearn_check_version("0.24"):
              X, y = self._validate_data(
                  X,
                  y,
                  multi_output=True,
                  accept_sparse=True,
                  dtype=[np.float64, np.float32],
                  force_all_finite=False,
              )
          else:
              X = check_array(
                  X,
                  dtype=[np.float64, np.float32],
                  force_all_finite=False,
              )
              y = check_array(
                  y,
                  ensure_2d=False,
                  dtype=X.dtype,
                  force_all_finite=False,
              )
  
          if y.ndim == 2 and y.shape[1] == 1:
              warnings.warn(
                  "A column-vector y was passed when a 1d array was"
                  " expected. Please change the shape of y to "
                  "(n_samples,), for example using ravel().",
                  DataConversionWarning,
                  stacklevel=2,
              )
  
          if y.ndim == 1:
              y = np.reshape(y, (-1, 1))
  
          self.n_outputs_ = y.shape[1]
  
          patching_status.and_conditions(
              [
                  (
                      self.n_outputs_ == 1,
                      f"Number of outputs ({self.n_outputs_}) is not 1.",
                  ),
                  (
                      y.dtype
                      in [np.float32, np.float64, np.int32, np.int64],
                      f"Datatype ({y.dtype}) for y is not supported.",
                  ),
              ]
          )
          # TODO: Fix to support integers as input
  
          _get_n_samples_bootstrap(
              n_samples=X.shape[0], max_samples=self.max_samples
          )
  
          if not self.bootstrap and self.max_samples is not None:
              raise ValueError(
                  "`max_sample` cannot be set if `bootstrap=False`. "
                  "Either switch to `bootstrap=True` or set "
                  "`max_sample=None`."
              )
  
          if (
              patching_status.get_status()
              and (self.random_state is not None)
              and (not daal_check_version((2024, "P", 0)))
          ):
              warnings.warn(
                  "Setting 'random_state' value is not supported. "
                  "State set by oneDAL to default value (777).",
                  RuntimeWarning,
              )
  
      return patching_status, X, y, sample_weight
  
imports: import numbers
  import warnings
  from abc import ABC
  import numpy
  from scipy import sparse
  from sklearn.base import clone
  from sklearn.ensemble import ExtraTreesClassifier
  from sklearn.ensemble import ExtraTreesRegressor
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.ensemble._forest import _get_n_samples_bootstrap
  from sklearn.exceptions import DataConversionWarning
  from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor, ExtraTreeClassifier, ExtraTreeRegressor
  from sklearn.tree._tree import Tree
  from sklearn.utils import check_random_state, deprecated
  from sklearn.utils.validation import check_array, check_consistent_length, check_is_fitted, check_X_y
  from daal4py.sklearn._utils import check_tree_nodes, control_n_jobs, daal_check_version, run_with_n_jobs, sklearn_check_version
  from onedal.ensemble import ExtraTreesClassifier
  from onedal.ensemble import ExtraTreesRegressor
  from onedal.ensemble import RandomForestClassifier
  from onedal.ensemble import RandomForestRegressor
  from onedal.primitives import get_tree_state_cls, get_tree_state_reg
  from onedal.utils import _num_features, _num_samples
  from .._config import get_config
  from .._device_offload import dispatch, wrap_output_data
  from .._utils import PatchingConditionsChain
label_desc: Use image node_id 4 for calling the ForestClassifier obj's underlying member method code with example usage: obj._onedal_fit_ready(patching_status, X, y, sample_weight) and returns: patching_status,  X,  y,  sample_weight