code: def test_listing_1():
      """
      Test GluonTS paper examples from arxiv paper:
      https://arxiv.org/abs/1906.05264
  
      Listing 1
      """
      pytest.importorskip("mxnet")
  
      from gluonts.evaluation import backtest_metrics, Evaluator
      from gluonts.mx import DeepAREstimator
      from gluonts.mx.trainer import Trainer
  
      # We use electricity in the paper but that would take too long to run in
      # the unit test
      dataset_info, train_ds, test_ds = constant_dataset()
  
      meta = dataset_info.metadata
  
      estimator = DeepAREstimator(
          freq=meta.freq,
          prediction_length=1,
          batch_size=32,
          trainer=Trainer(epochs=1),
      )
      predictor = estimator.train(train_ds)
  
      evaluator = Evaluator(quantiles=(0.1, 0.5, 0.9))
      agg_metrics, item_metrics = backtest_metrics(
          test_dataset=test_ds,
          predictor=predictor,
          evaluator=evaluator,
      )
  
imports: import pytest
  from gluonts.dataset.artificial import constant_dataset
  from gluonts.dataset.field_names import FieldName
label_desc: Use image node_id 1 for calling a global function with example usage: test_listing_1() without return types