<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ensure_valid_model_type(specified_type, model_type_list):
 """ Checks to make sure that `specified_type` is in `model_type_list` and raises a helpful error if this is not the case. Parameters specified_type : str. Denotes the user-specified model type that is to be checked. model_type_list : list of strings. Contains all of the model types that are acceptable kwarg values. Returns ------- None. """

    if specified_type not in model_type_list:
        msg_1 = "The specified model_type was not valid."
        msg_2 = "Valid model-types are {}".format(model_type_list)
        msg_3 = "The passed model-type was: {}".format(specified_type)
        total_msg = "\n".join([msg_1, msg_2, msg_3])
        raise ValueError(total_msg)
    return None