def terminate_paxes_with_id(running_paxes, pax_id):
    """Terminate all running paxes processes with a matching pax_id, return new list of running paxes, number terminated
    """
    new_running_paxes = []
    n_terminated = 0
    for p in running_paxes:
        if p.pax_id == pax_id:
            p.terminate()
            n_terminated += 1
        else:
            new_running_paxes.append(p)
    return new_running_paxes, n_terminated