code: def aggregate_all(
      metric_per_ts: pd.DataFrame, agg_funs: Dict[str, str]
  ) -> Dict[str, float]:
      """
      No filtering applied.
  
      Both `nan` and `inf` possible in aggregate metrics.
      """
      return {
          key: metric_per_ts[key].agg(agg, skipna=False)
          for key, agg in agg_funs.items()
      }
  
imports: import logging
  import multiprocessing
  import sys
  from functools import partial
  from itertools import chain, tee
  from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union, Mapping, cast
  import numpy
  import pandas
  from gluonts.gluonts_tqdm import tqdm
  from gluonts.model.forecast import Forecast, Quantile
  from gluonts.time_feature import get_seasonality
  from .metrics import abs_error, abs_target_mean, abs_target_sum, calculate_seasonal_error, coverage, mape, mase, mse, msis, quantile_loss, smape, num_masked_values
label_desc: Use image node_id 2 for calling a global function with example usage: aggregate_all(metric_per_ts, agg_funs) and returns: unknown