def METHOD_NAME(lvs, parameters, global_parameters):
    solver, prefix = lvs
    solver.solve()
    ksp_type = solver.snes.ksp.getType()
    pc_type = solver.snes.ksp.pc.getType()
    parms = global_parameters
    if prefix is None:
        parms = parameters
    expect_ksp_type = parms["ksp_type"]
    expect_pc_type = parms["pc_type"]
    assert ksp_type == expect_ksp_type
    assert pc_type == expect_pc_type
    J = solver._ctx._jac
    if prefix is not None and global_parameters["mat_type"] == "matfree":
        assert isinstance(J, ImplicitMatrix)
        assert J.petscmat.getType() == "python"