code: def helper_test_models_accuracy(
      self,
      series,
      past_covariates,
      min_rmse_model,
      model,
      idx,
      mode,
      output_chunk_length,
  ):
      # for every model, test whether it predicts the target with a minimum r2 score of `min_rmse`
      train_series, test_series = train_test_split(series, 70)
      train_past_covariates, _ = train_test_split(past_covariates, 70)
      model_instance = model(
          lags=12,
          lags_past_covariates=2,
          output_chunk_length=output_chunk_length,
          multi_models=mode,
      )
      model_instance.fit(
          series=train_series, past_covariates=train_past_covariates
      )
      prediction = model_instance.predict(
          n=len(test_series),
          series=train_series,
          past_covariates=past_covariates,
      )
      current_rmse = rmse(prediction, test_series)
      # in case of multi-series take mean rmse
      mean_rmse = np.mean(current_rmse)
      assert mean_rmse <= min_rmse_model[idx], (
          f"{str(model_instance)} model was not able to predict data as well as expected. "
          f"A mean rmse score of {mean_rmse} was recorded."
      )
  
imports: import copy
  import functools
  import itertools
  import math
  from unittest.mock import patch
  import numpy
  import pandas
  import pytest
  from sklearn.ensemble import HistGradientBoostingRegressor, RandomForestRegressor
  from sklearn.linear_model import LinearRegression
  import darts
  from darts import TimeSeries
  from darts.dataprocessing.encoders import FutureCyclicEncoder, PastDatetimeAttributeEncoder
  from darts.logging import get_logger
  from darts.metrics import mae, rmse
  from darts.models import CatBoostModel, LightGBMModel, LinearRegressionModel, NotImportedModule, RandomForest, RegressionModel, XGBModel
  from darts.utils import timeseries_generation
  from darts.utils.multioutput import MultiOutputRegressor
label_desc: Use image node_id 9 for calling the TestRegressionModels obj's underlying member method code with example usage: obj.helper_test_models_accuracy(series, past_covariates, min_rmse_model, model, idx, mode, output_chunk_length) without return types