code: def test_accuracy(predictor, accuracy):
      agg_metrics, item_metrics = backtest_metrics(
          test_dataset=constant_test_ds,
          predictor=predictor,
          evaluator=Evaluator(),
      )
  
      assert agg_metrics["ND"] <= accuracy
  
file_path: gluonts/test/ext/naive_2/test_predictors.py
imports: import tempfile
  from pathlib import Path
  import numpy
  import pandas
  import pytest
  from flaky import flaky
  from gluonts.dataset.artificial import constant_dataset
  from gluonts.dataset.common import Dataset
  from gluonts.dataset.util import forecast_start
  from gluonts.evaluation import Evaluator, backtest_metrics
  from gluonts.ext.naive_2 import Naive2Predictor
  from gluonts.model.predictor import Predictor
  from gluonts.model.seasonal_naive import SeasonalNaivePredictor
  from gluonts.pydantic import PositiveInt
  from gluonts.time_feature import get_seasonality
label_desc: Use image node_id 3 for calling a global function with example usage: test_accuracy(predictor, accuracy) without return types