code: def test_error():
      for label in TIME_SERIES:
          for forecast in TIME_SERIES:
              data = {"label": label, "0.5": forecast}
              actual = error(data, forecast_type="0.5")
              expected = label - forecast
  
              np.testing.assert_almost_equal(actual, expected)
  
file_path: gluonts/test/ev/test_stats.py
imports: import numpy
  from gluonts.ev.stats import absolute_error, absolute_label, absolute_percentage_error, coverage, error, quantile_loss, squared_error, symmetric_absolute_percentage_error, scaled_interval_score, absolute_scaled_error, scaled_quantile_loss
  from gluonts.ev.ts_stats import seasonal_error
label_desc: Use image node_id 2 for calling a global function with example usage: test_error() without return types