code: def get_seasonality(
      freq: str, seasonalities=DEFAULT_SEASONALITIES
  ) -> int:
      """
      Return the seasonality of a given frequency:
  
      >>> get_seasonality("2H")
      12
      """
      offset = pd.tseries.frequencies.to_offset(freq)
  
      base_seasonality = seasonalities.get(
          norm_freq_str(offset.name), 1
      )
  
      seasonality, remainder = divmod(base_seasonality, offset.n)
      if not remainder:
          return seasonality
  
      logger.warning(
          f"Multiple {offset.n} does not divide base seasonality "
          f"{base_seasonality}. Falling back to seasonality 1."
      )
      return 1
  
label_desc: Use image node_id 1 for calling a global function with example usage: get_seasonality(freq, seasonalities) and returns: int, seasonality