code: def test_accept_pretrain_global_models(self):
      linreg1 = LinearRegressionModel(lags=1)
      linreg2 = LinearRegressionModel(lags=2)
  
      linreg1.fit(self.lin_series[:30])
      linreg2.fit(self.lin_series[:30])
  
      model_ens = RegressionEnsembleModel(
          forecasting_models=[linreg1, linreg2],
          regression_train_n_points=10,
          train_forecasting_models=False,
      )
      model_ens.fit(self.sine_series[:45])
      model_ens.predict(5)
  
      # retrain_forecasting_models=True requires all the model to be reset
      with pytest.raises(ValueError):
          RegressionEnsembleModel(
              forecasting_models=[linreg1, linreg2],
              regression_train_n_points=10,
              train_forecasting_models=True,
          )
      model_ens_ft = RegressionEnsembleModel(
          forecasting_models=[
              linreg1.untrained_model(),
              linreg2.untrained_model(),
          ],
          regression_train_n_points=10,
          train_forecasting_models=True,
      )
      model_ens_ft.fit(self.sine_series[:45])
      model_ens_ft.predict(5)
  
imports: from typing import List, Union
  import numpy
  import pandas
  import pytest
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.linear_model import LinearRegression
  from darts import TimeSeries
  from darts.logging import get_logger
  from darts.metrics import mape, rmse
  from darts.models import LinearRegressionModel, NaiveDrift, NaiveSeasonal, RandomForest, RegressionEnsembleModel, RegressionModel, Theta
  from darts.tests.conftest import tfm_kwargs
  from darts.tests.models.forecasting.test_ensemble_models import _make_ts
  from darts.tests.models.forecasting.test_regression_models import train_test_split
  from darts.utils import timeseries_generation
label_desc: Use image node_id 6 for calling the TestRegressionEnsembleModels obj's underlying member method code with example usage: obj.test_accept_pretrain_global_models() without return types