code: def test_historical_forecasts_transferrable_future_cov_local_models(
      self,
  ):
      model = ARIMA()
      assert model.min_train_series_length == 30
      series = tg.sine_timeseries(length=31)
      res = model.historical_forecasts(
          series,
          future_covariates=series,
          retrain=True,
          forecast_horizon=1,
      )
      # ARIMA has a minimum train length of 30, with horizon=1, we expect one forecast at last point
      # (series has length 31)
      assert len(res) == 1
      assert series.end_time() == res.time_index[0]
  
      model.fit(series, future_covariates=series)
      res = model.historical_forecasts(
          series,
          future_covariates=series,
          retrain=False,
          forecast_horizon=1,
      )
      # currently even though transferrable local models would allow , the models currently still take the
      # min_train_length as input for historical forecast predictions (due to extreme_lags not differentiating
      # between fit and predict)
      # (series has length 31)
      assert len(res) == 1
      assert series.end_time() == res.time_index[0]
  
      # passing non-supported covariates
      with pytest.raises(ValueError) as msg:
          model.historical_forecasts(
              series,
              past_covariates=series,
              retrain=False,
          )
      assert str(msg.value).startswith(
          "Model prediction does not support `past_covariates`"
      )
  
imports: import itertools
  from itertools import product
  import numpy
  import pandas
  import pytest
  import darts
  from darts import TimeSeries, concatenate
  from darts.dataprocessing.transformers import Scaler
  from darts.datasets import AirPassengersDataset
  from darts.logging import get_logger
  from darts.models import ARIMA, AutoARIMA, CatBoostModel, LightGBMModel, LinearRegressionModel, NaiveSeasonal, NotImportedModule
  from darts.tests.conftest import tfm_kwargs
  from darts.utils import timeseries_generation
label_desc: Use image node_id 2 for calling the TestHistoricalforecast obj's underlying member method code with example usage: obj.test_historical_forecasts_transferrable_future_cov_local_models() without return types