code: def check_n_jobs(stepwise, n_jobs):
      """Potentially update the n_jobs parameter
  
      We can't run in parallel with the stepwise algorithm. This checks
      ``n_jobs`` w.r.t. stepwise and will warn.
      """
      if stepwise and n_jobs != 1:
          n_jobs = 1
          warnings.warn(
              "stepwise model cannot be fit in parallel (n_jobs=%i). "
              "Falling back to stepwise parameter search." % n_jobs
          )
      return n_jobs
  
file_path: pmdarima/pmdarima/arima/_validation.py
imports: import numpy
  import warnings
  from sklearn import metrics
  from pmdarima.warnings import ModelFitWarning
label_desc: Use image node_id 5 for calling a global function with example usage: check_n_jobs(stepwise, n_jobs) and returns: n_jobs