code: def test_torch_auto_start_with_past_cov(self, model_config):
      forecast_hrz = 10
      # Past covariates only
      model_cls, kwargs, bounds, type = model_config
      if type == "DualCovariates":
          return
  
      model = model_cls(
          random_state=0,
          **kwargs,
      )
      model.fit(self.ts_pass_train, self.ts_past_cov_train)
  
      # same start
      forecasts = 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,
          ],
          forecast_horizon=forecast_hrz,
          stride=1,
          retrain=True,
          overlap_end=False,
      )
  
      assert (
          len(forecasts) == 2
      ), f"Model {model_cls} did not return a list of historical forecasts"
  
      theorical_forecast_length = (
          self.ts_val_length
          - (bounds[0] + bounds[1])  # train sample length
          - (
              forecast_hrz - 1
          )  # if entire horizon is available, we can predict 1
          - 0  # past covs have same start as target -> no shift
          - 0  # we don't have future covs in output chunk -> no shift
      )
      assert (
          len(forecasts[0])
          == len(forecasts[1])
          == theorical_forecast_length
      ), (
          f"Model {model_cls} does not return the right number of historical forecasts in case "
          f"of retrain=True and overlap_end=False and past_covariates with same start. "
          f"Expected {theorical_forecast_length}, got {len(forecasts[0])} and {len(forecasts[1])}"
      )
  
      model = model_cls(
          random_state=0,
          **kwargs,
      )
      model.fit(
          self.ts_pass_train, past_covariates=self.ts_past_cov_train
      )
  
      # start before, after
      forecasts = model.historical_forecasts(
          series=[self.ts_pass_val, self.ts_pass_val],
          past_covariates=[
              self.ts_past_cov_valid_5_aft_start,
              self.ts_past_cov_valid_10_bef_start,
          ],
          forecast_horizon=forecast_hrz,
          stride=1,
          retrain=True,
          overlap_end=False,
      )
      theorical_forecast_length = (
          self.ts_val_length
          - (bounds[0] + bounds[1])  # train sample length
          - (
              forecast_hrz - 1
          )  # if entire horizon is available, we can predict 1
          - 5  # past covs start 5 later -> shift
          - 0  # we don't have future covs in output chunk -> no shift
      )
      assert len(forecasts[0]) == theorical_forecast_length, (
          f"Model {model_cls} does not return the right number of historical forecasts in case "
          f"of retrain=True and overlap_end=False and past_covariates starting after. "
          f"Expected {theorical_forecast_length}, got {len(forecasts[0])}"
      )
      theorical_forecast_length = (
          self.ts_val_length
          - (bounds[0] + bounds[1])  # train sample length
          - (
              forecast_hrz - 1
          )  # if entire horizon is available, we can predict 1
          - 0  # past covs have same start as target -> no shift
          - 0  # we don't have future covs in output chunk -> no shift
      )
      assert len(forecasts[1]) == theorical_forecast_length, (
          f"Model {model_cls} does not return the right number of historical forecasts in case "
          f"of retrain=True and overlap_end=False and past_covariates starting before. "
          f"Expected {theorical_forecast_length}, got {len(forecasts[1])}"
      )
  
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 18 for calling the TestHistoricalforecast obj's underlying member method code with example usage: obj.test_torch_auto_start_with_past_cov(model_config) without return types