code: def _predict(
      self,
      n: int,
      series: Optional[TimeSeries] = None,
      historic_future_covariates: Optional[TimeSeries] = None,
      future_covariates: Optional[TimeSeries] = None,
      num_samples: int = 1,
      verbose: bool = False,
  ) -> TimeSeries:
      if num_samples > 1 and self.trend:
          logger.warning(
              "Trends are not well supported yet for getting probabilistic forecasts with ARIMA."
              "If you run into issues, try calling fit() with num_samples=1 or removing the trend from"
              "your model."
          )
  
      super()._predict(
          n,
          series,
          historic_future_covariates,
          future_covariates,
          num_samples,
      )
  
      # updating statsmodels results object state with the new ts and covariates
      if series is not None:
          self.model = self.model.apply(
              series.values(copy=False),
              exog=historic_future_covariates.values(copy=False)
              if historic_future_covariates
              else None,
          )
  
      if num_samples == 1:
          forecast = self.model.forecast(
              steps=n,
              exog=future_covariates.values(copy=False)
              if future_covariates
              else None,
          )
      else:
          forecast = self.model.simulate(
              nsimulations=n,
              repetitions=num_samples,
              initial_state=self.model.states.predicted[-1, :],
              random_state=self._random_state,
              anchor="end",
              exog=future_covariates.values(copy=False)
              if future_covariates
              else None,
          )
  
      # restoring statsmodels results object state
      if series is not None:
          self.model = self.model.apply(
              self._orig_training_series.values(copy=False),
              exog=self.training_historic_future_covariates.values(
                  copy=False
              )
              if self.training_historic_future_covariates
              else None,
          )
  
      return self._build_forecast_series(forecast)
  
file_path: darts/darts/models/forecasting/arima.py
imports: from typing import Optional, Tuple
  import numpy
  from statsmodels import __version_tuple__
  from statsmodels.tsa.arima.model import ARIMA
  from darts.logging import get_logger
  from darts.models.forecasting.forecasting_model import TransferableFutureCovariatesLocalForecastingModel
  from darts.timeseries import TimeSeries
label_desc: Use image node_id 4 for calling the ARIMA obj's underlying member method code with example usage: obj._predict(n, series, historic_future_covariates, future_covariates, num_samples, verbose) and returns: self