def METHOD_NAME(s, name):
    # Save states
    import tempfile
    tmpdir = tempfile.mkdtemp("solver-test")
    tmpfile = os.path.join(tmpdir, name)
    states0 = s.get_states()
    s.save_states(tmpfile)
    # Load states
    with nn.context_scope(ctx):
        s1 = solver(*solver_args, **solver_kwargs)
        s1.set_parameters(params)
        s1.load_states(tmpfile)
    # Check save/load states
    states1 = s1.get_states()
    for k0, s0 in iteritems(states0):
        s1 = states1[k0]
        for sname, vx0 in iteritems(s0.pstate):
            vx1 = s1.pstate[sname]
            assert_allclose(vx0.d, vx1.d)
        assert s1.t == s0.t