code: def default_prediction_length_from_frequency(freq: str) -> int:
      prediction_length_map = {
          "T": 60,
          "H": 48,
          "D": 30,
          "W-SUN": 8,
          "M": 12,
          "Y": 4,
      }
      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/dataset/repository/_tsf_datasets.py
imports: from pathlib import Path
  from tempfile import TemporaryDirectory
  from typing import Dict, List, NamedTuple, Optional
  from urllib import request
  from zipfile import ZipFile
  from pandas.tseries.frequencies import to_offset
  from gluonts.dataset import DatasetWriter
  from gluonts.dataset.common import MetaData, TrainDatasets
  from gluonts.dataset.field_names import FieldName
  from gluonts.gluonts_tqdm import tqdm
  from ._tsf_reader import TSFReader, frequency_converter
  from ._util import metadata, request_retrieve_hook
label_desc: Use image node_id 3 for calling a global function with example usage: default_prediction_length_from_frequency(freq) and returns: prediction_length_map