code: def test_model_forecasts(method: str):
      prediction_length = 24 * 7
      quantile_levels = [0.5, 0.9, 0.2, 0.85]
  
      predictor = RForecastPredictor(
          freq=freq,
          prediction_length=prediction_length,
          period=period,
          method_name=method,
          params={
              "quantiles": quantile_levels,
              "output_types": ["mean", "quantiles"],
          },
      )
  
      forecast = list(predictor.predict(dataset))[0]
  
      assert forecast.prediction_length == prediction_length
  
      for level in quantile_levels:
          assert forecast.quantile(level).shape == (prediction_length,)
  
      assert no_quantile_crossing(forecast, quantile_levels)
  
file_path: gluonts/test/ext/r_forecast/test_r_multi_seasonality.py
imports: from typing import List
  import numpy
  import pandas
  import pytest
  from gluonts.evaluation import Evaluator, backtest_metrics
  from gluonts.ext.r_forecast import R_IS_INSTALLED, RPY2_IS_INSTALLED, RForecastPredictor
  from gluonts.model.forecast import QuantileForecast
label_desc: Use image node_id 2 for calling a global function with example usage: test_model_forecasts(method) without return types