code: def __init__(self, agg_multiples: List[int], freq_strs: List[str]):
      self.num_leaves = agg_multiples[0]
      self.agg_multiples = agg_multiples
      self.freq_strs = freq_strs
      self.agg_mat = TemporalHierarchy._get_agg_mat(
          agg_multiples=agg_multiples
      )
  
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 1 to create a new TemporalHierarchy object  with example: obj = TemporalHierarchy(agg_multiples, freq_strs)