'Formats the problem for the solver.
Parameters
constr_map : dict
A map of constraint type to a list of constraints.
solver: str
The solver being targetted.
Returns
dict
The dimensions of the cones.'

@staticmethod
def format_for_solver(constr_map, solver):

    dims = {}
    dims[s.EQ_DIM] = sum(((c.size[0] * c.size[1]) for c in constr_map[s.EQ]))
    dims[s.LEQ_DIM] = sum(((c.size[0] * c.size[1]) for c in constr_map[s.LEQ]))
    dims[s.SOC_DIM] = []
    dims[s.SDP_DIM] = []
    dims[s.EXP_DIM] = 0
    dims[s.BOOL_IDS] = []
    dims[s.INT_IDS] = []
    for constr_type in constr_map.keys():
        if (constr_type not in [s.EQ, s.LEQ]):
            for constr in constr_map[constr_type]:
                constr.format(constr_map[s.EQ], constr_map[s.LEQ], dims, solver)
    return dims
