def METHOD_NAME(config, id_list, quantiles, num_seasonalities_modelled, n_forecasts, device):
    """
    Router for all seasonality classes.
    """
    args = {
        "config": config,
        "id_list": id_list,
        "quantiles": quantiles,
        "n_forecasts": n_forecasts,
        "device": device,
        "num_seasonalities_modelled": num_seasonalities_modelled,
    }
    if config.global_local == "global":
        # Global seasonality
        return GlobalFourierSeasonality(**args)
    elif config.global_local == "local":
        # Local seasonality
        return LocalFourierSeasonality(**args)
    else:
        raise ValueError(f"Seasonality mode {config.global_local} is not supported.")