import warnings


def check_model(model: str) -> str:
    """Check model is 'aces' or 'btsettl'.

    Parameters
    ----------
    model: str
        Model name. Should be either 'aces' or 'btsettl'.

    Returns
    -------
    model: str
       Valid model output; either 'aces' or 'btsettl'.

"""
    if model == "phoenix":
        warnings.warn(
            "The model name 'phoenix' is depreciated, use 'aces' instead.",
            DeprecationWarning,
        )
        model = "aces"
    if model not in ["aces", "btsettl"]:
        raise ValueError(
            "Model name error of '{}'. Valid choices are 'aces' and 'btsettl'".format(
                model
            )
        )
    return model