code: def agg_series(seq: Tensor, agg_multiple: int):
      batch_size, seq_length = seq.shape[0:2]
  
      return seq.reshape(
          batch_size,
          seq_length // agg_multiple,
          agg_multiple,
          -1,
      ).sum(axis=2)
  
imports: from typing import Iterator, List
  import numpy
  import pandas
  from gluonts.core.component import validated
  from gluonts.model.forecast import SampleForecast
  from gluonts.mx import Tensor
label_desc: Use image node_id 4 for calling a global function with example usage: agg_series(seq, agg_multiple) and returns: seq