class_docstr: Abstract class for local forecasting models that are trained separately for each time series.
  
  Prediction is parallelized across CPU cores using joblib.Parallel.
  
  Attributes
  ----------
  allowed_local_model_args : List[str]
      Argument that can be passed to the underlying local model.
  default_n_jobs : Union[int, float]
      Default number of CPU cores used to train models. If float, this fraction of CPU cores will be used.
  default_max_ts_length : Optional[int]
      If not None, only the last ``max_ts_length`` time steps of each time series will be used to train the model.
      This significantly speeds up fitting and usually leads to no change in accuracy.
  init_time_in_seconds : int
      Time that it takes to initialize the model in seconds (e.g., because of JIT compilation by Numba).
      If time_limit is below this number, model won't be trained.
code: def _predict_wrapper(
      self, time_series: pd.Series, end_time: Optional[float] = None
  ) -> Tuple[pd.DataFrame, bool]:
      if end_time is not None and time.time() >= end_time:
          raise TimeLimitExceeded
      try:
          result = self._predict_with_local_model(
              time_series=time_series,
              local_model_args=self._local_model_args.copy(),
          )
          if not np.isfinite(result.values).all():
              raise RuntimeError("Forecast contains NaN or Inf values.")
          model_failed = False
      except Exception:
          if self.use_fallback_model:
              result = seasonal_naive_forecast(
                  target=time_series.values.ravel(),
                  prediction_length=self.prediction_length,
                  quantile_levels=self.quantile_levels,
                  seasonal_period=self._seasonal_period,
              )
              model_failed = True
          else:
              raise
      return result, model_failed
  
imports: import logging
  import time
  from multiprocessing import TimeoutError, cpu_count
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import pandas
  from joblib import Parallel, delayed
  from scipy.stats import norm
  from autogluon.common.utils.log_utils import set_logger_verbosity
  from autogluon.core.utils.exceptions import TimeLimitExceeded
  from autogluon.timeseries.dataset.ts_dataframe import ITEMID, TimeSeriesDataFrame
  from autogluon.timeseries.models.abstract import AbstractTimeSeriesModel
  from autogluon.timeseries.utils.datetime import get_seasonality
  from autogluon.timeseries.utils.forecast import get_forecast_horizon_index_ts_dataframe
  from autogluon.timeseries.utils.warning_filters import warning_filter
label_desc: Use image node_id 6 for calling the AbstractLocalModel obj's underlying member method code with example usage: obj._predict_wrapper(time_series, end_time) and returns: result,  model_failed