code: def test_forecast(name):
      forecast = FORECASTS[name]
  
      def percentile(value):
          return f"p{int(round(value * 100)):02d}"
  
      num_samples, pred_length = SAMPLES.shape
  
      for quantile in QUANTILES:
          test_cases = [quantile, str(quantile), percentile(quantile)]
          for quant_pred in map(forecast.quantile, test_cases):
              assert np.isclose(
                  quant_pred[0], quantile
              ), f"Expected {percentile(quantile)} quantile {quantile}. Obtained {quant_pred}."
  
      assert forecast.prediction_length == 1
      assert len(forecast.index) == pred_length
      assert forecast.index[0] == START_DATE
  
      forecast.plot()
  
file_path: gluonts/test/model/test_forecast.py
imports: import numpy
  import pandas
  import pytest
  from gluonts.model.forecast import QuantileForecast, SampleForecast, _linear_interpolation, ExponentialTailApproximation
label_desc: Use image node_id 1 for calling a global function with example usage: test_forecast(name) and returns: str, int