code: def default_prediction_length_from_frequency(freq: str) -> int:
      prediction_length_map = {
          "T": 60,
          "H": 48,
          "D": 30,
          "W": 8,
          "M": 12,
          "Y": 4,
          "W-SUN": 8,  # this frequency is missing in the original gluon-ts code
      }
      try:
          freq = to_offset(freq).name
          return prediction_length_map[freq]
      except KeyError as err:
          raise ValueError(
              f"Cannot obtain default prediction length from frequency `{freq}`."
          ) from err
  
file_path: gluonts/src/gluonts/nursery/few_shot_prediction/src/meta/datasets/dominick.py
imports: from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import Optional
  from zipfile import ZipFile
  from pandas.tseries.frequencies import to_offset
  from gluonts.dataset.field_names import FieldName
  from gluonts.dataset.repository._tsf_reader import TSFReader, frequency_converter
  from gluonts.dataset.repository._tsf_datasets import datasets, save_datasets, save_metadata
  from meta.datasets.gluonts import GluonTSDataModule
  from meta.datasets.registry import register_data_module
label_desc: Use image node_id 2 for calling a global function with example usage: default_prediction_length_from_frequency(freq) and returns: prediction_length_map