code: def test_r_predictor_serialization():
      predictor = RForecastPredictor(freq="1D", prediction_length=3)
      assert predictor == serde.decode(serde.encode(predictor))
  
file_path: gluonts/test/ext/r_forecast/test_r_univariate_predictor.py
imports: import pytest
  from gluonts.core import serde
  from gluonts.dataset.repository import datasets
  from gluonts.dataset.util import forecast_start, to_pandas
  from gluonts.evaluation import Evaluator, backtest_metrics
  from gluonts.model import QuantileForecast
  from gluonts.ext.r_forecast import RForecastPredictor, R_IS_INSTALLED, RPY2_IS_INSTALLED, SUPPORTED_UNIVARIATE_METHODS, UNIVARIATE_POINT_FORECAST_METHODS
label_desc: Use image node_id 2 for calling a global function with example usage: test_r_predictor_serialization() without return types