code: def helper_test_probabilistic_forecast_accuracy(
      self, model, err, ts, noisy_ts
  ):
      model.fit(noisy_ts[:100])
      pred = model.predict(n=100, num_samples=100)
  
      # test accuracy of the median prediction compared to the noiseless ts
      mae_err_median = mae(ts[100:], pred)
      assert mae_err_median < err
  
      # test accuracy for increasing quantiles between 0.7 and 1 (it should ~decrease, mae should ~increase)
      tested_quantiles = [0.7, 0.8, 0.9, 0.99]
      mae_err = mae_err_median
      for quantile in tested_quantiles:
          new_mae = mae(
              ts[100:], pred.quantile_timeseries(quantile=quantile)
          )
          assert mae_err < new_mae + 0.1
          mae_err = new_mae
  
      # test accuracy for decreasing quantiles between 0.3 and 0 (it should ~decrease, mae should ~increase)
      tested_quantiles = [0.3, 0.2, 0.1, 0.01]
      mae_err = mae_err_median
      for quantile in tested_quantiles:
          new_mae = mae(
              ts[100:], pred.quantile_timeseries(quantile=quantile)
          )
          assert mae_err < new_mae + 0.1
          mae_err = new_mae
  
file_path: darts/darts/tests/models/forecasting/test_probabilistic_models.py
imports: import platform
  import numpy
  import pytest
  from darts import TimeSeries
  from darts.logging import get_logger
  from darts.metrics import mae
  from darts.models import ARIMA, BATS, TBATS, CatBoostModel, ExponentialSmoothing, LightGBMModel, LinearRegressionModel, NotImportedModule, XGBModel
  from darts.tests.conftest import tfm_kwargs
  from darts.utils import timeseries_generation
label_desc: Use image node_id 4 for calling the TestProbabilisticModels obj's underlying member method code with example usage: obj.helper_test_probabilistic_forecast_accuracy(model, err, ts, noisy_ts) without return types