def METHOD_NAME(net):
    output_writer = OutputWriter(net, time_steps=[0, 1])
    class DivergentController(Controller):
        def __init__(self, net):
            super().__init__(net)
        def time_step(self, net, time):
            self.convergent = True if time % 2 == 0 else False
        def is_converged(self, net):
            return self.convergent
    DivergentController(net)
    with pytest.raises(ct.ControllerNotConverged):
        run_timeseries(net, time_steps=range(0, 3), output_writer=output_writer, max_iter=3, verbose=False)
    # assert no exceptions but appropriate output in outputwriter
    run_timeseries(net, time_steps=range(0, 3), output_writer=output_writer, max_iter=3,
                   continue_on_divergence=True, verbose=False)
    for i, out in enumerate(output_writer.output["Parameters"].controller_unstable):
        if i % 2 == 0:
            assert not out
        else:
            assert out