<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def solve_lp(clusters, quota, work_dir="work", Nmax=0, self_match=False, solver="SCIP", verbose=False):
 """ Solve the formatted LP instance """

    qb, qa = quota  # flip it
    nodes, constraints_x, constraints_y = get_constraints(
        clusters, (qa, qb), Nmax=Nmax)

    if self_match:
        constraints_x = constraints_y = constraints_x | constraints_y

    lp_data = format_lp(nodes, constraints_x, qa, constraints_y, qb)

    if solver == "SCIP":
        filtered_list = SCIPSolver(lp_data, work_dir, verbose=verbose).results
        if not filtered_list:
            print("SCIP fails... trying GLPK", file=sys.stderr)
            filtered_list = GLPKSolver(
                lp_data, work_dir, verbose=verbose).results

    elif solver == "GLPK":
        filtered_list = GLPKSolver(lp_data, work_dir, verbose=verbose).results
        if not filtered_list:
            print("GLPK fails... trying SCIP", file=sys.stderr)
            filtered_list = SCIPSolver(
                lp_data, work_dir, verbose=verbose).results

    return filtered_list