def _determine_educ_type(model_name):
    """Determine whether an education model is school, preschool or nursery.

    Args:
        model_name (str): name of the education model, e.g. educ_school_0.

    """
    name_parts = model_name.split("_")
    msg = f"The name of your education model {model_name} does not "
    assert len(name_parts) == 3, msg + "consist of three parts."
    assert name_parts[0] == "educ", (
        msg + f"have educ as first part but {name_parts[0]}."
    )
    assert name_parts[1] in ["nursery", "preschool", "school"], (
        msg + "belong to ['nursery', 'preschool', 'school']."
    )
    assert name_parts[2].isdigit(), (
        msg + f"have a number as last part but {name_parts[2]}"
    )
    return name_parts[1]