def convert_into_nb_of_seconds(freq: str, horizon: int) -> int:
    """Converts a forecasting horizon in number of seconds.

    Parameters
    ----------
    freq : str
        Dataset frequency.
    horizon : int
        Forecasting horizon in dataset frequency units.

    Returns
    -------
    int
        Forecasting horizon in seconds.
    """
    mapping = {
        "s": horizon,
        "H": horizon * 60 * 60,
        "D": horizon * 60 * 60 * 24,
        "W": horizon * 60 * 60 * 24 * 7,
        "M": horizon * 60 * 60 * 24 * 30,
        "Q": horizon * 60 * 60 * 24 * 90,
        "Y": horizon * 60 * 60 * 24 * 365,
    }
    return mapping[freq]