code: def test_regression_auto_start_multiple_with_cov_retrain(
      self, model_config
  ):
      forecast_hrz = 10
      model_cls, kwargs, _, bounds = model_config
      model = model_cls(
          random_state=0,
          **kwargs,
      )
  
      forecasts_retrain = model.historical_forecasts(
          series=[self.ts_pass_val, self.ts_pass_val],
          past_covariates=[
              self.ts_past_cov_valid_same_start,
              self.ts_past_cov_valid_same_start,
          ]
          if "lags_past_covariates" in kwargs
          else None,
          future_covariates=[
              self.ts_past_cov_valid_same_start,
              self.ts_past_cov_valid_same_start,
          ]
          if "lags_future_covariates" in kwargs
          else None,
          last_points_only=True,
          forecast_horizon=forecast_hrz,
          stride=1,
          retrain=True,
          overlap_end=False,
      )
  
      assert (
          len(forecasts_retrain) == 2
      ), f"Model {model_cls} did not return a list of historical forecasts"
  
      (
          min_target_lag,
          max_target_lag,
          min_past_cov_lag,
          max_past_cov_lag,
          min_future_cov_lag,
          max_future_cov_lag,
      ) = model.extreme_lags
  
      past_lag = min(
          min_target_lag if min_target_lag else 0,
          min_past_cov_lag if min_past_cov_lag else 0,
          min_future_cov_lag
          if min_future_cov_lag is not None and min_future_cov_lag < 0
          else 0,
      )
  
      future_lag = (
          max_future_cov_lag
          if max_future_cov_lag is not None and max_future_cov_lag > 0
          else 0
      )
      # length input - largest past lag - forecast horizon - max(largest future lag, output_chunk_length)
      theorical_retrain_forecast_length = len(self.ts_pass_val) - (
          -past_lag
          + forecast_hrz
          + max(future_lag + 1, kwargs.get("output_chunk_length", 1))
      )
      assert (
          len(forecasts_retrain[0])
          == len(forecasts_retrain[1])
          == theorical_retrain_forecast_length
      ), (
          f"Model {model_cls} does not return the right number of historical forecasts in the case of "
          f"retrain=True and overlap_end=False. "
          f"Expected {theorical_retrain_forecast_length}, got {len(forecasts_retrain[0])} "
          f"and {len(forecasts_retrain[1])}"
      )
  
      # with last_points_only=True: start is shifted by biggest past lag + training timestamps
      # (forecast horizon + output_chunk_length)
      expected_start = (
          self.ts_pass_val.start_time()
          + (
              -past_lag
              + forecast_hrz
              + kwargs.get("output_chunk_length", 1)
          )
          * self.ts_pass_val.freq
      )
      assert forecasts_retrain[0].start_time() == expected_start
  
      # end is shifted back by the biggest future lag
      if model.output_chunk_length - 1 > future_lag:
          shift = 0
      else:
          shift = future_lag
      expected_end = (
          self.ts_pass_val.end_time() - shift * self.ts_pass_val.freq
      )
      assert forecasts_retrain[0].end_time() == expected_end
  
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 16 for calling the TestHistoricalforecast obj's underlying member method code with example usage: obj.test_regression_auto_start_multiple_with_cov_retrain(model_config) without return types