'Formats SDP constraints as inequalities for the solver.
Parameters
eq_constr : list
A list of the equality constraints in the canonical problem.
leq_constr : list
A list of the inequality constraints in the canonical problem.
dims : dict
A dict with the dimensions of the conic constraints.
solver : str
The solver being called.'

def format(self, eq_constr, leq_constr, dims, solver):

    if (solver.name() in [s.CVXOPT, s.MOSEK]):
        (new_eq_constr, new_leq_constr) = self.__CVXOPT_format
    elif (solver.name() == s.SCS):
        (new_eq_constr, new_leq_constr) = self.__SCS_format
    else:
        raise SolverError('Solver    does    not    support    positive    semidefinite    cone.')
    if self.enforce_sym:
        eq_constr += new_eq_constr
        dims[s.EQ_DIM] += ((self.size[0] * (self.size[1] - 1)) // 2)
    leq_constr += new_leq_constr
    dims[s.SDP_DIM].append(self.size[0])
