code: def test_metric_inf(metric: MetricDefinition, axis: Optional[tuple]):
      time_series_length = 3
      number_of_entries = 2
  
      data = {
          "label": np.zeros((1, time_series_length)),
          "0.5": np.ones((1, time_series_length)),
          "0.1": np.ones((1, time_series_length)),
          "0.9": np.ones((1, time_series_length)),
          "mean": np.ones((1, time_series_length)),
          "seasonal_error": 0.0,
      }
  
      evaluator = metric(axis=axis)
      for _ in range(number_of_entries):
          evaluator.update(data)
  
      result = evaluator.get()
      expected = np.full(
          (number_of_entries, time_series_length), np.inf
      ).sum(axis=axis)
  
      assert result.shape == expected.shape
      assert np.allclose(result, expected)
  
imports: from typing import Optional
  import numpy
  import pytest
  from gluonts.ev.metrics import Coverage, MAECoverage, MetricDefinition, MSE, MAE, MAPE, SMAPE, MASE, MeanScaledQuantileLoss, AverageMeanScaledQuantileLoss, WeightedSumQuantileLoss, MeanWeightedSumQuantileLoss, ND, RMSE, NRMSE
  from gluonts.ev.ts_stats import seasonal_error
label_desc: Use image node_id 2 for calling a global function with example usage: test_metric_inf(metric, axis) without return types