code: def to_TemporalHierarchy(freq_strs: List[str]) -> TemporalHierarchy:
      agg_multiples = freqs_to_agg_mulitples(freq_strs)
      return TemporalHierarchy(
          agg_multiples=agg_multiples, freq_strs=freq_strs
      )
  
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 3 for calling a global function with example usage: to_TemporalHierarchy(freq_strs) and returns: TemporalHierarchy