code: def test_mean_only_forecast():
      forecast = QuantileForecast(
          forecast_arrays=np.ones(shape=(1, 12)),
          start_date=pd.Period("2022-03-04 00", freq="H"),
          forecast_keys=["mean"],
      )
  
      assert forecast.prediction_length == 12
      assert len(forecast.index) == 12
      assert forecast.index[0] == pd.Period("2022-03-04 00", freq="H")
  
      for level in [0.1, 0.5, 0.7]:
          assert np.isnan(forecast.quantile(level)).all()
  
      assert np.equal(forecast.mean, 1).all()
  
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 2 for calling a global function with example usage: test_mean_only_forecast() without return types