def compose_agents(measures):
    """
    Utility function to compose agent dictionaries as expected by the simulation
    model as input from the dictionary of prevention measures.

    Parameters
    ----------
    prevention_measures : dictionary
        Dictionary of prevention measures. Needs to include the fields
        (student, teacher, family_member) _screen_interval
        and _mask.

    Returns
    -------
    agent_types : dictionary of dictionaries
        Dictionary containing the fields "screening_interval",
        "index_probability" and "mask" for the agent groups "student", "teacher"
        and "family_member".

    """
    agent_types = {
        "unistudent": {
            "screening_interval": measures["unistudent_screen_interval"],
            "mask": measures["unistudent_mask"],
            "vaccination_ratio": measures["unistudent_vaccination_ratio"],
        },
        "lecturer": {
            "screening_interval": measures["lecturer_screen_interval"],
            "mask": measures["lecturer_mask"],
            "vaccination_ratio": measures["lecturer_vaccination_ratio"],
        },
    }

    return agent_types