def get_N_state(model, state):
    """Get the number of people with a certain state at a certain step in the model"""
    agents_with_state = [agent.state for agent in model.schedule.agents if agent.state == state]
    N_state = len(agents_with_state)
    return N_state