class_docstr: Searches for the best model using the stepwise algorithm.
  
  The stepwise algorithm fluctuates the more sensitive pieces of the ARIMA
  (the seasonal components) first, adjusting towards the direction of the
  smaller {A|B|HQ}IC(c), and continues to step down as long as the error
  shrinks. As long as the error term decreases and the best parameters have
  not shifted to a point where they can no longer change, ``k`` will
  increase, and the models will continue to be fit until the ``max_k`` is
  reached.
  
  References
  ----------
  .. [1] R's auto-arima stepwise source code: https://github.com/robjhyndman/forecast/blob/30308a4e314ff29338291462e81bf68ff0c5f86d/R/newarima2.R#L366
  .. [2] https://robjhyndman.com/hyndsight/arma-roots/
code: def __init__(
      self,
      y,
      X,
      start_params,
      trend,
      method,
      maxiter,
      fit_params,
      suppress_warnings,
      trace,
      error_action,
      out_of_sample_size,
      scoring,
      scoring_args,
      p,
      d,
      q,
      P,
      D,
      Q,
      m,
      max_p,
      max_q,
      max_P,
      max_Q,
      seasonal,
      information_criterion,
      with_intercept,
      **kwargs,
  ):
      self.trace = _validation.check_trace(trace)
  
      # Create a partial of the fit call so we don't have arg bloat all over
      self._fit_arima = functools.partial(
          _fit_candidate_model,
          y=y,
          X=X,
          start_params=start_params,
          trend=trend,
          method=method,
          maxiter=maxiter,
          fit_params=fit_params,
          suppress_warnings=suppress_warnings,
          trace=self.trace,
          error_action=error_action,
          out_of_sample_size=out_of_sample_size,
          scoring=scoring,
          scoring_args=scoring_args,
          information_criterion=information_criterion,
          **kwargs,
      )
  
      self.information_criterion = information_criterion
      self.with_intercept = with_intercept
  
      # order stuff we will be incrementing
      self.p = p
      self.d = d
      self.q = q
      self.P = P
      self.D = D
      self.Q = Q
      self.m = m
      self.max_p = max_p
      self.max_q = max_q
      self.max_P = max_P
      self.max_Q = max_Q
      self.seasonal = seasonal
  
      # execution context passed through the context manager
      self.exec_context = ContextStore.get_or_empty(
          ContextType.STEPWISE
      )
  
      # other internal start vars
      self.k = self.start_k = 0
      self.max_k = (
          100
          if self.exec_context.max_steps is None
          else self.exec_context.max_steps
      )
      self.max_dur = self.exec_context.max_dur
  
      # results list to store intermittent hashes of orders to determine if
      # we've seen this order before...
      self.results_dict = dict()  # dict[tuple -> ARIMA]
      self.ic_dict = dict()  # dict[tuple -> float]
      self.fit_time_dict = dict()  # dict[tuple -> float]
  
      self.bestfit = None
      self.bestfit_key = None
  
imports: from numpy.linalg import LinAlgError
  import numpy
  from datetime import datetime
  from joblib import Parallel, delayed
  from sklearn.utils import check_random_state
  import abc
  import functools
  import time
  import warnings
  import traceback
  from .arima import ARIMA
  from ..warnings import ModelFitWarning
  from ._context import ContextType, ContextStore
  from .None import _validation
  from ..compat import statsmodels
label_desc: Use image node_id 1 to create a new _StepwiseFitWrapper object from inherited base classes: _SolverMixin with example: obj = _StepwiseFitWrapper(y, X, start_params, trend, method, maxiter, fit_params, suppress_warnings, trace, error_action, out_of_sample_size, scoring, scoring_args, p, d, q, P, D, Q, m, max_p, max_q, max_P, max_Q, seasonal, information_criterion, with_intercept)