code: def test_aggregate_valid():
      num_series = 3
      series = [
          pd.Series(
              np.random.normal(24 + 6),
              index=pd.date_range(
                  start="2022-12-31 00", periods=24 + 6, freq="H"
              ),
          ).to_period()
          for _ in range(num_series)
      ]
      forecasts = [
          SampleForecast(
              samples=np.random.normal(size=(10, 6)),
              start_date=pd.Period("2023-01-01 00", freq="H"),
              item_id=str(item_id),
          )
          for item_id in range(num_series)
      ]
      evaluator = Evaluator(
          aggregation_strategy=aggregate_valid, num_workers=None
      )
      agg_metrics, item_metrics = evaluator(series, forecasts)
  
file_path: gluonts/test/evaluation/test_evaluator.py
imports: import numpy
  import pandas
  import pytest
  from gluonts.evaluation import Evaluator, MultivariateEvaluator, aggregate_valid
  from gluonts.model.forecast import QuantileForecast, SampleForecast
label_desc: Use image node_id 14 for calling a global function with example usage: test_aggregate_valid() without return types