code: def test_target_metrics(target, metric, expected):
      np.testing.assert_almost_equal(metric(target), expected)
  
imports: import numpy
  import pytest
  from gluonts.evaluation.metrics import abs_error, abs_target_mean, abs_target_sum, calculate_seasonal_error, coverage, mape, mase, mse, msis, quantile_loss, smape
label_desc: Use image node_id 2 for calling a global function with example usage: test_target_metrics(target, metric, expected) without return types